xref: /rk3399_ARM-atf/bl31/bl31.ld.S (revision f8578e641b38694a6a2dee84ef7a7b3b0b50bd0f)
14f6ad66aSAchin Gupta/*
28aabea33SPaul Beesley * Copyright (c) 2013-2019, 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
18*f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
19*f8578e64SSamuel Holland    NOBITS (rw!a): ORIGIN = BL31_NOBITS_BASE, LENGTH = BL31_NOBITS_LIMIT - BL31_NOBITS_BASE
20*f8578e64SSamuel Holland#else
21*f8578e64SSamuel Holland#define NOBITS RAM
22*f8578e64SSamuel 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
206*f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
207*f8578e64SSamuel Holland    /*
208*f8578e64SSamuel Holland     * Define a linker symbol to mark end of the RW memory area for this
209*f8578e64SSamuel Holland     * image.
210*f8578e64SSamuel Holland     */
211*f8578e64SSamuel Holland    __RW_END__ = .;
212*f8578e64SSamuel Holland    __BL31_END__ = .;
213*f8578e64SSamuel Holland
214*f8578e64SSamuel Holland    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
215*f8578e64SSamuel Holland
216*f8578e64SSamuel Holland    . = BL31_NOBITS_BASE;
217*f8578e64SSamuel Holland    ASSERT(. == ALIGN(PAGE_SIZE),
218*f8578e64SSamuel Holland           "BL31 NOBITS base address is not aligned on a page boundary.")
219*f8578e64SSamuel Holland
220*f8578e64SSamuel Holland    __NOBITS_START__ = .;
221*f8578e64SSamuel Holland#endif
222*f8578e64SSamuel Holland
2238d69a03fSSandrine Bailleux    stacks (NOLOAD) : {
2248d69a03fSSandrine Bailleux        __STACKS_START__ = .;
2254f6ad66aSAchin Gupta        *(tzfw_normal_stacks)
2268d69a03fSSandrine Bailleux        __STACKS_END__ = .;
227*f8578e64SSamuel Holland    } >NOBITS
2284f6ad66aSAchin Gupta
2298d69a03fSSandrine Bailleux    /*
2308d69a03fSSandrine Bailleux     * The .bss section gets initialised to 0 at runtime.
231308d359bSDouglas Raillard     * Its base address should be 16-byte aligned for better performance of the
232308d359bSDouglas Raillard     * zero-initialization code.
2338d69a03fSSandrine Bailleux     */
234ee7b35c4SAndrew Thoelke    .bss (NOLOAD) : ALIGN(16) {
2358d69a03fSSandrine Bailleux        __BSS_START__ = .;
236ebd6efaeSSamuel Holland        *(SORT_BY_ALIGNMENT(.bss*))
2374f6ad66aSAchin Gupta        *(COMMON)
238ee7b35c4SAndrew Thoelke#if !USE_COHERENT_MEM
239ee7b35c4SAndrew Thoelke        /*
240ee7b35c4SAndrew Thoelke         * Bakery locks are stored in normal .bss memory
241ee7b35c4SAndrew Thoelke         *
242ee7b35c4SAndrew Thoelke         * Each lock's data is spread across multiple cache lines, one per CPU,
243ee7b35c4SAndrew Thoelke         * but multiple locks can share the same cache line.
244ee7b35c4SAndrew Thoelke         * The compiler will allocate enough memory for one CPU's bakery locks,
245ee7b35c4SAndrew Thoelke         * the remaining cache lines are allocated by the linker script
246ee7b35c4SAndrew Thoelke         */
247ee7b35c4SAndrew Thoelke        . = ALIGN(CACHE_WRITEBACK_GRANULE);
248ee7b35c4SAndrew Thoelke        __BAKERY_LOCK_START__ = .;
249596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_START__ = .;
250ee7b35c4SAndrew Thoelke        *(bakery_lock)
251ee7b35c4SAndrew Thoelke        . = ALIGN(CACHE_WRITEBACK_GRANULE);
252596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_END__ = .;
253596929b9SVarun Wadekar        __PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(__PERCPU_BAKERY_LOCK_END__ - __PERCPU_BAKERY_LOCK_START__);
254ee7b35c4SAndrew Thoelke        . = . + (__PERCPU_BAKERY_LOCK_SIZE__ * (PLATFORM_CORE_COUNT - 1));
255ee7b35c4SAndrew Thoelke        __BAKERY_LOCK_END__ = .;
25632aee841SRoberto Vargas
25732aee841SRoberto Vargas	/*
25832aee841SRoberto Vargas	 * If BL31 doesn't use any bakery lock then __PERCPU_BAKERY_LOCK_SIZE__
25932aee841SRoberto Vargas	 * will be zero. For this reason, the only two valid values for
26032aee841SRoberto Vargas	 * __PERCPU_BAKERY_LOCK_SIZE__ are 0 or the platform defined value
26132aee841SRoberto Vargas	 * PLAT_PERCPU_BAKERY_LOCK_SIZE.
26232aee841SRoberto Vargas	 */
263ee7b35c4SAndrew Thoelke#ifdef PLAT_PERCPU_BAKERY_LOCK_SIZE
26432aee841SRoberto Vargas    ASSERT((__PERCPU_BAKERY_LOCK_SIZE__ == 0) || (__PERCPU_BAKERY_LOCK_SIZE__ == PLAT_PERCPU_BAKERY_LOCK_SIZE),
265ee7b35c4SAndrew Thoelke        "PLAT_PERCPU_BAKERY_LOCK_SIZE does not match bakery lock requirements");
266ee7b35c4SAndrew Thoelke#endif
267ee7b35c4SAndrew Thoelke#endif
268a31d8983SYatharth Kochar
269a31d8983SYatharth Kochar#if ENABLE_PMF
270a31d8983SYatharth Kochar        /*
271a31d8983SYatharth Kochar         * Time-stamps are stored in normal .bss memory
272a31d8983SYatharth Kochar         *
273a31d8983SYatharth Kochar         * The compiler will allocate enough memory for one CPU's time-stamps,
2748aabea33SPaul Beesley         * the remaining memory for other CPUs is allocated by the
275a31d8983SYatharth Kochar         * linker script
276a31d8983SYatharth Kochar         */
277a31d8983SYatharth Kochar        . = ALIGN(CACHE_WRITEBACK_GRANULE);
278a31d8983SYatharth Kochar        __PMF_TIMESTAMP_START__ = .;
279a31d8983SYatharth Kochar        KEEP(*(pmf_timestamp_array))
280a31d8983SYatharth Kochar        . = ALIGN(CACHE_WRITEBACK_GRANULE);
281a31d8983SYatharth Kochar        __PMF_PERCPU_TIMESTAMP_END__ = .;
282a31d8983SYatharth Kochar        __PERCPU_TIMESTAMP_SIZE__ = ABSOLUTE(. - __PMF_TIMESTAMP_START__);
283a31d8983SYatharth Kochar        . = . + (__PERCPU_TIMESTAMP_SIZE__ * (PLATFORM_CORE_COUNT - 1));
284a31d8983SYatharth Kochar        __PMF_TIMESTAMP_END__ = .;
285a31d8983SYatharth Kochar#endif /* ENABLE_PMF */
2868d69a03fSSandrine Bailleux        __BSS_END__ = .;
287*f8578e64SSamuel Holland    } >NOBITS
2884f6ad66aSAchin Gupta
2898d69a03fSSandrine Bailleux    /*
290e3fff153SJeenu Viswambharan     * The xlat_table section is for full, aligned page tables (4K).
291a0cd989dSAchin Gupta     * Removing them from .bss avoids forcing 4K alignment on
292883d1b5dSAntonio Nino Diaz     * the .bss section. The tables are initialized to zero by the translation
293883d1b5dSAntonio Nino Diaz     * tables library.
294a0cd989dSAchin Gupta     */
295a0cd989dSAchin Gupta    xlat_table (NOLOAD) : {
296a0cd989dSAchin Gupta        *(xlat_table)
297*f8578e64SSamuel Holland    } >NOBITS
298a0cd989dSAchin Gupta
299ab8707e6SSoby Mathew#if USE_COHERENT_MEM
300a0cd989dSAchin Gupta    /*
3018d69a03fSSandrine Bailleux     * The base address of the coherent memory section must be page-aligned (4K)
3028d69a03fSSandrine Bailleux     * to guarantee that the coherent data are stored on their own pages and
3038d69a03fSSandrine Bailleux     * are not mixed with normal data.  This is required to set up the correct
3048d69a03fSSandrine Bailleux     * memory attributes for the coherent data page tables.
3058d69a03fSSandrine Bailleux     */
306a2aedac2SAntonio Nino Diaz    coherent_ram (NOLOAD) : ALIGN(PAGE_SIZE) {
3078d69a03fSSandrine Bailleux        __COHERENT_RAM_START__ = .;
308ee7b35c4SAndrew Thoelke        /*
309ee7b35c4SAndrew Thoelke         * Bakery locks are stored in coherent memory
310ee7b35c4SAndrew Thoelke         *
311ee7b35c4SAndrew Thoelke         * Each lock's data is contiguous and fully allocated by the compiler
312ee7b35c4SAndrew Thoelke         */
313ee7b35c4SAndrew Thoelke        *(bakery_lock)
3148d69a03fSSandrine Bailleux        *(tzfw_coherent_mem)
3158d69a03fSSandrine Bailleux        __COHERENT_RAM_END_UNALIGNED__ = .;
3168d69a03fSSandrine Bailleux        /*
3178d69a03fSSandrine Bailleux         * Memory page(s) mapped to this section will be marked
3188d69a03fSSandrine Bailleux         * as device memory.  No other unexpected data must creep in.
3198d69a03fSSandrine Bailleux         * Ensure the rest of the current memory page is unused.
3208d69a03fSSandrine Bailleux         */
3215629b2b1SRoberto Vargas        . = ALIGN(PAGE_SIZE);
3228d69a03fSSandrine Bailleux        __COHERENT_RAM_END__ = .;
323*f8578e64SSamuel Holland    } >NOBITS
324ab8707e6SSoby Mathew#endif
3254f6ad66aSAchin Gupta
326*f8578e64SSamuel Holland#if SEPARATE_NOBITS_REGION
327*f8578e64SSamuel Holland    /*
328*f8578e64SSamuel Holland     * Define a linker symbol to mark end of the NOBITS memory area for this
329*f8578e64SSamuel Holland     * image.
330*f8578e64SSamuel Holland     */
331*f8578e64SSamuel Holland    __NOBITS_END__ = .;
332*f8578e64SSamuel Holland
333*f8578e64SSamuel Holland    ASSERT(. <= BL31_NOBITS_LIMIT, "BL31 NOBITS region has exceeded its limit.")
334*f8578e64SSamuel Holland#else
33554dc71e7SAchin Gupta    /*
33654dc71e7SAchin Gupta     * Define a linker symbol to mark end of the RW memory area for this
33754dc71e7SAchin Gupta     * image.
33854dc71e7SAchin Gupta     */
33954dc71e7SAchin Gupta    __RW_END__ = .;
3408d69a03fSSandrine Bailleux    __BL31_END__ = .;
3414f6ad66aSAchin Gupta
342d178637dSJuan Castillo    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
343*f8578e64SSamuel Holland#endif
3444f6ad66aSAchin Gupta}
345