xref: /rk3399_ARM-atf/bl31/bl31.ld.S (revision c367b75e8517f76182e196548ee098e27ef3a2c5)
14f6ad66aSAchin Gupta/*
2*c367b75eSMadhukar Pappireddy * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
34f6ad66aSAchin Gupta *
482cb2c1aSdp-arm * SPDX-License-Identifier: BSD-3-Clause
54f6ad66aSAchin Gupta */
64f6ad66aSAchin Gupta
75f0cdb05SDan Handley#include <platform_def.h>
809d40e0eSAntonio Nino Diaz
909d40e0eSAntonio Nino Diaz#include <lib/xlat_tables/xlat_tables_defs.h>
104f6ad66aSAchin Gupta
114f6ad66aSAchin GuptaOUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
124f6ad66aSAchin GuptaOUTPUT_ARCH(PLATFORM_LINKER_ARCH)
139f98aa1aSJeenu ViswambharanENTRY(bl31_entrypoint)
144f6ad66aSAchin Gupta
154f6ad66aSAchin Gupta
164f6ad66aSAchin GuptaMEMORY {
17d7fbf132SJuan Castillo    RAM (rwx): ORIGIN = BL31_BASE, LENGTH = BL31_LIMIT - BL31_BASE
18f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
19f8578e64SSamuel Holland    NOBITS (rw!a): ORIGIN = BL31_NOBITS_BASE, LENGTH = BL31_NOBITS_LIMIT - BL31_NOBITS_BASE
20f8578e64SSamuel Holland#else
21f8578e64SSamuel Holland#define NOBITS RAM
22f8578e64SSamuel Holland#endif
234f6ad66aSAchin Gupta}
244f6ad66aSAchin Gupta
25ec693569SCaesar Wang#ifdef PLAT_EXTRA_LD_SCRIPT
26ec693569SCaesar Wang#include <plat.ld.S>
27ec693569SCaesar Wang#endif
284f6ad66aSAchin Gupta
294f6ad66aSAchin GuptaSECTIONS
304f6ad66aSAchin Gupta{
314f6ad66aSAchin Gupta    . = BL31_BASE;
32a2aedac2SAntonio Nino Diaz    ASSERT(. == ALIGN(PAGE_SIZE),
338d69a03fSSandrine Bailleux           "BL31_BASE address is not aligned on a page boundary.")
344f6ad66aSAchin Gupta
35931f7c61SSoby Mathew    __BL31_START__ = .;
36931f7c61SSoby Mathew
375d1c104fSSandrine Bailleux#if SEPARATE_CODE_AND_RODATA
385d1c104fSSandrine Bailleux    .text . : {
395d1c104fSSandrine Bailleux        __TEXT_START__ = .;
405d1c104fSSandrine Bailleux        *bl31_entrypoint.o(.text*)
41ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.text*))
425d1c104fSSandrine Bailleux        *(.vectors)
435629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
445d1c104fSSandrine Bailleux        __TEXT_END__ = .;
455d1c104fSSandrine Bailleux    } >RAM
465d1c104fSSandrine Bailleux
475d1c104fSSandrine Bailleux    .rodata . : {
485d1c104fSSandrine Bailleux        __RODATA_START__ = .;
49ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.rodata*))
505d1c104fSSandrine Bailleux
515d1c104fSSandrine Bailleux        /* Ensure 8-byte alignment for descriptors and ensure inclusion */
525d1c104fSSandrine Bailleux        . = ALIGN(8);
535d1c104fSSandrine Bailleux        __RT_SVC_DESCS_START__ = .;
545d1c104fSSandrine Bailleux        KEEP(*(rt_svc_descs))
555d1c104fSSandrine Bailleux        __RT_SVC_DESCS_END__ = .;
565d1c104fSSandrine Bailleux
575d1c104fSSandrine Bailleux#if ENABLE_PMF
585d1c104fSSandrine Bailleux        /* Ensure 8-byte alignment for descriptors and ensure inclusion */
595d1c104fSSandrine Bailleux        . = ALIGN(8);
605d1c104fSSandrine Bailleux        __PMF_SVC_DESCS_START__ = .;
615d1c104fSSandrine Bailleux        KEEP(*(pmf_svc_descs))
625d1c104fSSandrine Bailleux        __PMF_SVC_DESCS_END__ = .;
635d1c104fSSandrine Bailleux#endif /* ENABLE_PMF */
645d1c104fSSandrine Bailleux
655d1c104fSSandrine Bailleux        /*
665d1c104fSSandrine Bailleux         * Ensure 8-byte alignment for cpu_ops so that its fields are also
675d1c104fSSandrine Bailleux         * aligned. Also ensure cpu_ops inclusion.
685d1c104fSSandrine Bailleux         */
695d1c104fSSandrine Bailleux        . = ALIGN(8);
705d1c104fSSandrine Bailleux        __CPU_OPS_START__ = .;
715d1c104fSSandrine Bailleux        KEEP(*(cpu_ops))
725d1c104fSSandrine Bailleux        __CPU_OPS_END__ = .;
735d1c104fSSandrine Bailleux
74931f7c61SSoby Mathew        /*
755bfac4fcSSoby Mathew         * Keep the .got section in the RO section as it is patched
76931f7c61SSoby Mathew         * prior to enabling the MMU and having the .got in RO is better for
775bfac4fcSSoby Mathew         * security. GOT is a table of addresses so ensure 8-byte alignment.
78931f7c61SSoby Mathew         */
795bfac4fcSSoby Mathew        . = ALIGN(8);
80931f7c61SSoby Mathew        __GOT_START__ = .;
81931f7c61SSoby Mathew        *(.got)
82931f7c61SSoby Mathew        __GOT_END__ = .;
83931f7c61SSoby Mathew
848e743bcdSJeenu Viswambharan        /* Place pubsub sections for events */
858e743bcdSJeenu Viswambharan        . = ALIGN(8);
8609d40e0eSAntonio Nino Diaz#include <lib/el3_runtime/pubsub_events.h>
878e743bcdSJeenu Viswambharan
885629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
895d1c104fSSandrine Bailleux        __RODATA_END__ = .;
905d1c104fSSandrine Bailleux    } >RAM
915d1c104fSSandrine Bailleux#else
928d69a03fSSandrine Bailleux    ro . : {
938d69a03fSSandrine Bailleux        __RO_START__ = .;
94dccc537aSAndrew Thoelke        *bl31_entrypoint.o(.text*)
95ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.text*))
96ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.rodata*))
977421b465SAchin Gupta
98dccc537aSAndrew Thoelke        /* Ensure 8-byte alignment for descriptors and ensure inclusion */
997421b465SAchin Gupta        . = ALIGN(8);
1007421b465SAchin Gupta        __RT_SVC_DESCS_START__ = .;
101dccc537aSAndrew Thoelke        KEEP(*(rt_svc_descs))
1027421b465SAchin Gupta        __RT_SVC_DESCS_END__ = .;
1037421b465SAchin Gupta
104a31d8983SYatharth Kochar#if ENABLE_PMF
105a31d8983SYatharth Kochar        /* Ensure 8-byte alignment for descriptors and ensure inclusion */
106a31d8983SYatharth Kochar        . = ALIGN(8);
107a31d8983SYatharth Kochar        __PMF_SVC_DESCS_START__ = .;
108a31d8983SYatharth Kochar        KEEP(*(pmf_svc_descs))
109a31d8983SYatharth Kochar        __PMF_SVC_DESCS_END__ = .;
110a31d8983SYatharth Kochar#endif /* ENABLE_PMF */
111a31d8983SYatharth Kochar
1129b476841SSoby Mathew        /*
1139b476841SSoby Mathew         * Ensure 8-byte alignment for cpu_ops so that its fields are also
1149b476841SSoby Mathew         * aligned. Also ensure cpu_ops inclusion.
1159b476841SSoby Mathew         */
1169b476841SSoby Mathew        . = ALIGN(8);
1179b476841SSoby Mathew        __CPU_OPS_START__ = .;
1189b476841SSoby Mathew        KEEP(*(cpu_ops))
1199b476841SSoby Mathew        __CPU_OPS_END__ = .;
1209b476841SSoby Mathew
1215bfac4fcSSoby Mathew        /*
1225bfac4fcSSoby Mathew         * Keep the .got section in the RO section as it is patched
1235bfac4fcSSoby Mathew         * prior to enabling the MMU and having the .got in RO is better for
1245bfac4fcSSoby Mathew         * security. GOT is a table of addresses so ensure 8-byte alignment.
1255bfac4fcSSoby Mathew         */
1265bfac4fcSSoby Mathew        . = ALIGN(8);
1275bfac4fcSSoby Mathew        __GOT_START__ = .;
1285bfac4fcSSoby Mathew        *(.got)
1295bfac4fcSSoby Mathew        __GOT_END__ = .;
1305bfac4fcSSoby Mathew
1318e743bcdSJeenu Viswambharan        /* Place pubsub sections for events */
1328e743bcdSJeenu Viswambharan        . = ALIGN(8);
13309d40e0eSAntonio Nino Diaz#include <lib/el3_runtime/pubsub_events.h>
1348e743bcdSJeenu Viswambharan
135b739f22aSAchin Gupta        *(.vectors)
1368d69a03fSSandrine Bailleux        __RO_END_UNALIGNED__ = .;
1378d69a03fSSandrine Bailleux        /*
1388d69a03fSSandrine Bailleux         * Memory page(s) mapped to this section will be marked as read-only,
1398d69a03fSSandrine Bailleux         * executable.  No RW data from the next section must creep in.
1408d69a03fSSandrine Bailleux         * Ensure the rest of the current memory page is unused.
1418d69a03fSSandrine Bailleux         */
1425629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
1438d69a03fSSandrine Bailleux        __RO_END__ = .;
1444f6ad66aSAchin Gupta    } >RAM
1455d1c104fSSandrine Bailleux#endif
1464f6ad66aSAchin Gupta
1479b476841SSoby Mathew    ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__,
1489b476841SSoby Mathew           "cpu_ops not defined for this platform.")
1499b476841SSoby Mathew
150538b0020SPaul Beesley#if SPM_MM
15132e83537SArd Biesheuvel#ifndef SPM_SHIM_EXCEPTIONS_VMA
15232e83537SArd Biesheuvel#define SPM_SHIM_EXCEPTIONS_VMA         RAM
15332e83537SArd Biesheuvel#endif
15432e83537SArd Biesheuvel
1552fccb228SAntonio Nino Diaz    /*
1562fccb228SAntonio Nino Diaz     * Exception vectors of the SPM shim layer. They must be aligned to a 2K
1572fccb228SAntonio Nino Diaz     * address, but we need to place them in a separate page so that we can set
1582fccb228SAntonio Nino Diaz     * individual permissions to them, so the actual alignment needed is 4K.
1592fccb228SAntonio Nino Diaz     *
1602fccb228SAntonio Nino Diaz     * There's no need to include this into the RO section of BL31 because it
1612fccb228SAntonio Nino Diaz     * doesn't need to be accessed by BL31.
1622fccb228SAntonio Nino Diaz     */
163a2aedac2SAntonio Nino Diaz    spm_shim_exceptions : ALIGN(PAGE_SIZE) {
1642fccb228SAntonio Nino Diaz        __SPM_SHIM_EXCEPTIONS_START__ = .;
1652fccb228SAntonio Nino Diaz        *(.spm_shim_exceptions)
1665629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
1672fccb228SAntonio Nino Diaz        __SPM_SHIM_EXCEPTIONS_END__ = .;
16832e83537SArd Biesheuvel    } >SPM_SHIM_EXCEPTIONS_VMA AT>RAM
16932e83537SArd Biesheuvel
17032e83537SArd Biesheuvel    PROVIDE(__SPM_SHIM_EXCEPTIONS_LMA__ = LOADADDR(spm_shim_exceptions));
17132e83537SArd Biesheuvel    . = LOADADDR(spm_shim_exceptions) + SIZEOF(spm_shim_exceptions);
1722fccb228SAntonio Nino Diaz#endif
1732fccb228SAntonio Nino Diaz
17454dc71e7SAchin Gupta    /*
17554dc71e7SAchin Gupta     * Define a linker symbol to mark start of the RW memory area for this
17654dc71e7SAchin Gupta     * image.
17754dc71e7SAchin Gupta     */
17854dc71e7SAchin Gupta    __RW_START__ = . ;
17954dc71e7SAchin Gupta
18051faada7SDouglas Raillard    /*
18151faada7SDouglas Raillard     * .data must be placed at a lower address than the stacks if the stack
18251faada7SDouglas Raillard     * protector is enabled. Alternatively, the .data.stack_protector_canary
18351faada7SDouglas Raillard     * section can be placed independently of the main .data section.
18451faada7SDouglas Raillard     */
1858d69a03fSSandrine Bailleux   .data . : {
1868d69a03fSSandrine Bailleux        __DATA_START__ = .;
187ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.data*))
1888d69a03fSSandrine Bailleux        __DATA_END__ = .;
1898d69a03fSSandrine Bailleux    } >RAM
1908d69a03fSSandrine Bailleux
191931f7c61SSoby Mathew    /*
192931f7c61SSoby Mathew     * .rela.dyn needs to come after .data for the read-elf utility to parse
1935bfac4fcSSoby Mathew     * this section correctly. Ensure 8-byte alignment so that the fields of
1945bfac4fcSSoby Mathew     * RELA data structure are aligned.
195931f7c61SSoby Mathew     */
1965bfac4fcSSoby Mathew    . = ALIGN(8);
197931f7c61SSoby Mathew    __RELA_START__ = .;
198931f7c61SSoby Mathew    .rela.dyn . : {
199931f7c61SSoby Mathew    } >RAM
200931f7c61SSoby Mathew    __RELA_END__ = .;
201931f7c61SSoby Mathew
202a1b6db6cSSandrine Bailleux#ifdef BL31_PROGBITS_LIMIT
203d178637dSJuan Castillo    ASSERT(. <= BL31_PROGBITS_LIMIT, "BL31 progbits has exceeded its limit.")
204a1b6db6cSSandrine Bailleux#endif
205a1b6db6cSSandrine Bailleux
206f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
207f8578e64SSamuel Holland    /*
208f8578e64SSamuel Holland     * Define a linker symbol to mark end of the RW memory area for this
209f8578e64SSamuel Holland     * image.
210f8578e64SSamuel Holland     */
211*c367b75eSMadhukar Pappireddy    . = ALIGN(PAGE_SIZE);
212f8578e64SSamuel Holland    __RW_END__ = .;
213f8578e64SSamuel Holland    __BL31_END__ = .;
214f8578e64SSamuel Holland
215f8578e64SSamuel Holland    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
216f8578e64SSamuel Holland
217f8578e64SSamuel Holland    . = BL31_NOBITS_BASE;
218f8578e64SSamuel Holland    ASSERT(. == ALIGN(PAGE_SIZE),
219f8578e64SSamuel Holland           "BL31 NOBITS base address is not aligned on a page boundary.")
220f8578e64SSamuel Holland
221f8578e64SSamuel Holland    __NOBITS_START__ = .;
222f8578e64SSamuel Holland#endif
223f8578e64SSamuel Holland
2248d69a03fSSandrine Bailleux    stacks (NOLOAD) : {
2258d69a03fSSandrine Bailleux        __STACKS_START__ = .;
2264f6ad66aSAchin Gupta        *(tzfw_normal_stacks)
2278d69a03fSSandrine Bailleux        __STACKS_END__ = .;
228f8578e64SSamuel Holland    } >NOBITS
2294f6ad66aSAchin Gupta
2308d69a03fSSandrine Bailleux    /*
2318d69a03fSSandrine Bailleux     * The .bss section gets initialised to 0 at runtime.
232308d359bSDouglas Raillard     * Its base address should be 16-byte aligned for better performance of the
233308d359bSDouglas Raillard     * zero-initialization code.
2348d69a03fSSandrine Bailleux     */
235ee7b35c4SAndrew Thoelke    .bss (NOLOAD) : ALIGN(16) {
2368d69a03fSSandrine Bailleux        __BSS_START__ = .;
237ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.bss*))
2384f6ad66aSAchin Gupta        *(COMMON)
239ee7b35c4SAndrew Thoelke#if !USE_COHERENT_MEM
240ee7b35c4SAndrew Thoelke        /*
241ee7b35c4SAndrew Thoelke         * Bakery locks are stored in normal .bss memory
242ee7b35c4SAndrew Thoelke         *
243ee7b35c4SAndrew Thoelke         * Each lock's data is spread across multiple cache lines, one per CPU,
244ee7b35c4SAndrew Thoelke         * but multiple locks can share the same cache line.
245ee7b35c4SAndrew Thoelke         * The compiler will allocate enough memory for one CPU's bakery locks,
246ee7b35c4SAndrew Thoelke         * the remaining cache lines are allocated by the linker script
247ee7b35c4SAndrew Thoelke         */
248ee7b35c4SAndrew Thoelke        . = ALIGN(CACHE_WRITEBACK_GRANULE);
249ee7b35c4SAndrew Thoelke        __BAKERY_LOCK_START__ = .;
250596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_START__ = .;
251ee7b35c4SAndrew Thoelke        *(bakery_lock)
252ee7b35c4SAndrew Thoelke        . = ALIGN(CACHE_WRITEBACK_GRANULE);
253596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_END__ = .;
254596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(__PERCPU_BAKERY_LOCK_END__ - __PERCPU_BAKERY_LOCK_START__);
255ee7b35c4SAndrew Thoelke        . = . + (__PERCPU_BAKERY_LOCK_SIZE__ * (PLATFORM_CORE_COUNT - 1));
256ee7b35c4SAndrew Thoelke        __BAKERY_LOCK_END__ = .;
25732aee841SRoberto Vargas
25832aee841SRoberto Vargas	/*
25932aee841SRoberto Vargas	 * If BL31 doesn't use any bakery lock then __PERCPU_BAKERY_LOCK_SIZE__
26032aee841SRoberto Vargas	 * will be zero. For this reason, the only two valid values for
26132aee841SRoberto Vargas	 * __PERCPU_BAKERY_LOCK_SIZE__ are 0 or the platform defined value
26232aee841SRoberto Vargas	 * PLAT_PERCPU_BAKERY_LOCK_SIZE.
26332aee841SRoberto Vargas	 */
264ee7b35c4SAndrew Thoelke#ifdef PLAT_PERCPU_BAKERY_LOCK_SIZE
26532aee841SRoberto Vargas    ASSERT((__PERCPU_BAKERY_LOCK_SIZE__ == 0) || (__PERCPU_BAKERY_LOCK_SIZE__ == PLAT_PERCPU_BAKERY_LOCK_SIZE),
266ee7b35c4SAndrew Thoelke        "PLAT_PERCPU_BAKERY_LOCK_SIZE does not match bakery lock requirements");
267ee7b35c4SAndrew Thoelke#endif
268ee7b35c4SAndrew Thoelke#endif
269a31d8983SYatharth Kochar
270a31d8983SYatharth Kochar#if ENABLE_PMF
271a31d8983SYatharth Kochar        /*
272a31d8983SYatharth Kochar         * Time-stamps are stored in normal .bss memory
273a31d8983SYatharth Kochar         *
274a31d8983SYatharth Kochar         * The compiler will allocate enough memory for one CPU's time-stamps,
2758aabea33SPaul Beesley         * the remaining memory for other CPUs is allocated by the
276a31d8983SYatharth Kochar         * linker script
277a31d8983SYatharth Kochar         */
278a31d8983SYatharth Kochar        . = ALIGN(CACHE_WRITEBACK_GRANULE);
279a31d8983SYatharth Kochar        __PMF_TIMESTAMP_START__ = .;
280a31d8983SYatharth Kochar        KEEP(*(pmf_timestamp_array))
281a31d8983SYatharth Kochar        . = ALIGN(CACHE_WRITEBACK_GRANULE);
282a31d8983SYatharth Kochar        __PMF_PERCPU_TIMESTAMP_END__ = .;
283a31d8983SYatharth Kochar        __PERCPU_TIMESTAMP_SIZE__ = ABSOLUTE(. - __PMF_TIMESTAMP_START__);
284a31d8983SYatharth Kochar        . = . + (__PERCPU_TIMESTAMP_SIZE__ * (PLATFORM_CORE_COUNT - 1));
285a31d8983SYatharth Kochar        __PMF_TIMESTAMP_END__ = .;
286a31d8983SYatharth Kochar#endif /* ENABLE_PMF */
2878d69a03fSSandrine Bailleux        __BSS_END__ = .;
288f8578e64SSamuel Holland    } >NOBITS
2894f6ad66aSAchin Gupta
2908d69a03fSSandrine Bailleux    /*
291e3fff153SJeenu Viswambharan     * The xlat_table section is for full, aligned page tables (4K).
292a0cd989dSAchin Gupta     * Removing them from .bss avoids forcing 4K alignment on
293883d1b5dSAntonio Nino Diaz     * the .bss section. The tables are initialized to zero by the translation
294883d1b5dSAntonio Nino Diaz     * tables library.
295a0cd989dSAchin Gupta     */
296a0cd989dSAchin Gupta    xlat_table (NOLOAD) : {
297a0cd989dSAchin Gupta        *(xlat_table)
298f8578e64SSamuel Holland    } >NOBITS
299a0cd989dSAchin Gupta
300ab8707e6SSoby Mathew#if USE_COHERENT_MEM
301a0cd989dSAchin Gupta    /*
3028d69a03fSSandrine Bailleux     * The base address of the coherent memory section must be page-aligned (4K)
3038d69a03fSSandrine Bailleux     * to guarantee that the coherent data are stored on their own pages and
3048d69a03fSSandrine Bailleux     * are not mixed with normal data.  This is required to set up the correct
3058d69a03fSSandrine Bailleux     * memory attributes for the coherent data page tables.
3068d69a03fSSandrine Bailleux     */
307a2aedac2SAntonio Nino Diaz    coherent_ram (NOLOAD) : ALIGN(PAGE_SIZE) {
3088d69a03fSSandrine Bailleux        __COHERENT_RAM_START__ = .;
309ee7b35c4SAndrew Thoelke        /*
310ee7b35c4SAndrew Thoelke         * Bakery locks are stored in coherent memory
311ee7b35c4SAndrew Thoelke         *
312ee7b35c4SAndrew Thoelke         * Each lock's data is contiguous and fully allocated by the compiler
313ee7b35c4SAndrew Thoelke         */
314ee7b35c4SAndrew Thoelke        *(bakery_lock)
3158d69a03fSSandrine Bailleux        *(tzfw_coherent_mem)
3168d69a03fSSandrine Bailleux        __COHERENT_RAM_END_UNALIGNED__ = .;
3178d69a03fSSandrine Bailleux        /*
3188d69a03fSSandrine Bailleux         * Memory page(s) mapped to this section will be marked
3198d69a03fSSandrine Bailleux         * as device memory.  No other unexpected data must creep in.
3208d69a03fSSandrine Bailleux         * Ensure the rest of the current memory page is unused.
3218d69a03fSSandrine Bailleux         */
3225629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
3238d69a03fSSandrine Bailleux        __COHERENT_RAM_END__ = .;
324f8578e64SSamuel Holland    } >NOBITS
325ab8707e6SSoby Mathew#endif
3264f6ad66aSAchin Gupta
327f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
328f8578e64SSamuel Holland    /*
329f8578e64SSamuel Holland     * Define a linker symbol to mark end of the NOBITS memory area for this
330f8578e64SSamuel Holland     * image.
331f8578e64SSamuel Holland     */
332f8578e64SSamuel Holland    __NOBITS_END__ = .;
333f8578e64SSamuel Holland
334f8578e64SSamuel Holland    ASSERT(. <= BL31_NOBITS_LIMIT, "BL31 NOBITS region has exceeded its limit.")
335f8578e64SSamuel Holland#else
33654dc71e7SAchin Gupta    /*
33754dc71e7SAchin Gupta     * Define a linker symbol to mark end of the RW memory area for this
33854dc71e7SAchin Gupta     * image.
33954dc71e7SAchin Gupta     */
34054dc71e7SAchin Gupta    __RW_END__ = .;
3418d69a03fSSandrine Bailleux    __BL31_END__ = .;
3424f6ad66aSAchin Gupta
343d178637dSJuan Castillo    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
344f8578e64SSamuel Holland#endif
3454f6ad66aSAchin Gupta}
346