Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 1 | /* |
Chris Kay | 33bfc5e | 2023-02-14 11:30:04 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Masahiro Yamada | 0b67e56 | 2020-03-09 17:39:48 +0900 | [diff] [blame] | 7 | #include <common/bl_common.ld.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <lib/xlat_tables/xlat_tables_defs.h> |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 9 | |
| 10 | OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT) |
| 11 | OUTPUT_ARCH(PLATFORM_LINKER_ARCH) |
| 12 | ENTRY(bl2_entrypoint) |
| 13 | |
| 14 | MEMORY { |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 15 | #if BL2_IN_XIP_MEM |
| 16 | ROM (rx): ORIGIN = BL2_RO_BASE, LENGTH = BL2_RO_LIMIT - BL2_RO_BASE |
| 17 | RAM (rwx): ORIGIN = BL2_RW_BASE, LENGTH = BL2_RW_LIMIT - BL2_RW_BASE |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 18 | #else /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 19 | RAM (rwx): ORIGIN = BL2_BASE, LENGTH = BL2_LIMIT - BL2_BASE |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 20 | #endif /* BL2_IN_XIP_MEM */ |
| 21 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 22 | #if SEPARATE_BL2_NOLOAD_REGION |
| 23 | RAM_NOLOAD (rw!a): ORIGIN = BL2_NOLOAD_START, LENGTH = BL2_NOLOAD_LIMIT - BL2_NOLOAD_START |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 24 | #else /* SEPARATE_BL2_NOLOAD_REGION */ |
| 25 | # define RAM_NOLOAD RAM |
| 26 | #endif /* SEPARATE_BL2_NOLOAD_REGION */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 27 | } |
| 28 | |
Masahiro Yamada | 5289b67 | 2019-06-14 17:49:17 +0900 | [diff] [blame] | 29 | #if !BL2_IN_XIP_MEM |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 30 | # define ROM RAM |
| 31 | #endif /* !BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 32 | |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 33 | SECTIONS { |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 34 | RAM_REGION_START = ORIGIN(RAM); |
| 35 | RAM_REGION_LENGTH = LENGTH(RAM); |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 36 | #if BL2_IN_XIP_MEM |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 37 | ROM_REGION_START = ORIGIN(ROM); |
| 38 | ROM_REGION_LENGTH = LENGTH(ROM); |
| 39 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 40 | . = BL2_RO_BASE; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 41 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 42 | ASSERT(. == ALIGN(PAGE_SIZE), |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 43 | "BL2_RO_BASE address is not aligned on a page boundary.") |
| 44 | #else /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 45 | . = BL2_BASE; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 46 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 47 | ASSERT(. == ALIGN(PAGE_SIZE), |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 48 | "BL2_BASE address is not aligned on a page boundary.") |
| 49 | #endif /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 50 | |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 51 | #if SEPARATE_BL2_NOLOAD_REGION |
| 52 | RAM_NOLOAD_REGION_START = ORIGIN(RAM_NOLOAD); |
| 53 | RAM_NOLOAD_REGION_LENGTH = LENGTH(RAM_NOLOAD); |
| 54 | #endif |
| 55 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 56 | #if SEPARATE_CODE_AND_RODATA |
| 57 | .text . : { |
Andrey Skvortsov | 08526ad | 2023-09-05 22:09:25 +0300 | [diff] [blame] | 58 | ASSERT(. == ALIGN(PAGE_SIZE), |
| 59 | ".text address is not aligned on a page boundary."); |
| 60 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 61 | __TEXT_START__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 62 | __TEXT_RESIDENT_START__ = .; |
| 63 | |
| 64 | *bl2_el3_entrypoint.o(.text*) |
| 65 | *(.text.asm.*) |
| 66 | |
| 67 | __TEXT_RESIDENT_END__ = .; |
| 68 | |
Samuel Holland | 23f5e54 | 2019-10-20 16:11:25 -0500 | [diff] [blame] | 69 | *(SORT_BY_ALIGNMENT(.text*)) |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 70 | *(.vectors) |
Michal Simek | 80c530e | 2023-04-27 14:26:03 +0200 | [diff] [blame] | 71 | __TEXT_END_UNALIGNED__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 72 | |
Roberto Vargas | d93fde3 | 2018-04-11 11:53:31 +0100 | [diff] [blame] | 73 | . = ALIGN(PAGE_SIZE); |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 74 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 75 | __TEXT_END__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 76 | } >ROM |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 77 | |
| 78 | .rodata . : { |
| 79 | __RODATA_START__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 80 | |
Samuel Holland | 23f5e54 | 2019-10-20 16:11:25 -0500 | [diff] [blame] | 81 | *(SORT_BY_ALIGNMENT(.rodata*)) |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 82 | |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 83 | RODATA_COMMON |
Masahiro Yamada | 65d699d | 2020-01-17 13:45:02 +0900 | [diff] [blame] | 84 | |
Michal Simek | 80c530e | 2023-04-27 14:26:03 +0200 | [diff] [blame] | 85 | __RODATA_END_UNALIGNED__ = .; |
Roberto Vargas | d93fde3 | 2018-04-11 11:53:31 +0100 | [diff] [blame] | 86 | . = ALIGN(PAGE_SIZE); |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 87 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 88 | __RODATA_END__ = .; |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 89 | } >ROM |
Roberto Vargas | 51abc34 | 2017-11-17 10:51:54 +0000 | [diff] [blame] | 90 | |
| 91 | ASSERT(__TEXT_RESIDENT_END__ - __TEXT_RESIDENT_START__ <= PAGE_SIZE, |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 92 | "Resident part of BL2 has exceeded its limit.") |
| 93 | #else /* SEPARATE_CODE_AND_RODATA */ |
Chris Kay | 33bfc5e | 2023-02-14 11:30:04 +0000 | [diff] [blame] | 94 | .ro . : { |
Andrey Skvortsov | 08526ad | 2023-09-05 22:09:25 +0300 | [diff] [blame] | 95 | ASSERT(. == ALIGN(PAGE_SIZE), |
| 96 | ".ro address is not aligned on a page boundary."); |
| 97 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 98 | __RO_START__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 99 | __TEXT_RESIDENT_START__ = .; |
| 100 | |
| 101 | *bl2_el3_entrypoint.o(.text*) |
| 102 | *(.text.asm.*) |
| 103 | |
| 104 | __TEXT_RESIDENT_END__ = .; |
| 105 | |
Samuel Holland | 23f5e54 | 2019-10-20 16:11:25 -0500 | [diff] [blame] | 106 | *(SORT_BY_ALIGNMENT(.text*)) |
| 107 | *(SORT_BY_ALIGNMENT(.rodata*)) |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 108 | |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 109 | RODATA_COMMON |
Masahiro Yamada | 65d699d | 2020-01-17 13:45:02 +0900 | [diff] [blame] | 110 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 111 | *(.vectors) |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 112 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 113 | __RO_END_UNALIGNED__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 114 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 115 | /* |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 116 | * Memory page(s) mapped to this section will be marked as read-only, |
| 117 | * executable. No RW data from the next section must creep in. Ensure |
| 118 | * that the rest of the current memory page is unused. |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 119 | */ |
Roberto Vargas | d93fde3 | 2018-04-11 11:53:31 +0100 | [diff] [blame] | 120 | . = ALIGN(PAGE_SIZE); |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 121 | |
| 122 | __RO_END__ = .; |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 123 | } >ROM |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 124 | #endif /* SEPARATE_CODE_AND_RODATA */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 125 | |
| 126 | ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__, |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 127 | "cpu_ops not defined for this platform.") |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 128 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 129 | #if BL2_IN_XIP_MEM |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 130 | ROM_REGION_END = .; |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 131 | . = BL2_RW_BASE; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 132 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 133 | ASSERT(BL2_RW_BASE == ALIGN(PAGE_SIZE), |
| 134 | "BL2_RW_BASE address is not aligned on a page boundary.") |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 135 | #endif /* BL2_IN_XIP_MEM */ |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 136 | |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 137 | __RW_START__ = .; |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 138 | |
Masahiro Yamada | c5864d8 | 2020-04-22 10:50:12 +0900 | [diff] [blame] | 139 | DATA_SECTION >RAM AT>ROM |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 140 | |
Masahiro Yamada | c5864d8 | 2020-04-22 10:50:12 +0900 | [diff] [blame] | 141 | __DATA_RAM_START__ = __DATA_START__; |
| 142 | __DATA_RAM_END__ = __DATA_END__; |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 143 | |
Masahiro Yamada | 85fa00e | 2020-04-22 11:27:55 +0900 | [diff] [blame] | 144 | RELA_SECTION >RAM |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 145 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 146 | #if SEPARATE_BL2_NOLOAD_REGION |
| 147 | SAVED_ADDR = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 148 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 149 | . = BL2_NOLOAD_START; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 150 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 151 | __BL2_NOLOAD_START__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 152 | #endif /* SEPARATE_BL2_NOLOAD_REGION */ |
| 153 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 154 | STACK_SECTION >RAM_NOLOAD |
| 155 | BSS_SECTION >RAM_NOLOAD |
| 156 | XLAT_TABLE_SECTION >RAM_NOLOAD |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 157 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 158 | #if SEPARATE_BL2_NOLOAD_REGION |
| 159 | __BL2_NOLOAD_END__ = .; |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 160 | RAM_NOLOAD_REGION_END = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 161 | |
Jiafei Pan | 0824b45 | 2022-02-24 10:47:33 +0800 | [diff] [blame] | 162 | . = SAVED_ADDR; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 163 | #endif /* SEPARATE_BL2_NOLOAD_REGION */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 164 | |
| 165 | #if USE_COHERENT_MEM |
| 166 | /* |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 167 | * The base address of the coherent memory section must be page-aligned to |
| 168 | * guarantee that the coherent data are stored on their own pages and are |
| 169 | * not mixed with normal data. This is required to set up the correct |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 170 | * memory attributes for the coherent data page tables. |
| 171 | */ |
Chris Kay | 33bfc5e | 2023-02-14 11:30:04 +0000 | [diff] [blame] | 172 | .coherent_ram (NOLOAD) : ALIGN(PAGE_SIZE) { |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 173 | __COHERENT_RAM_START__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 174 | |
Chris Kay | 33bfc5e | 2023-02-14 11:30:04 +0000 | [diff] [blame] | 175 | *(.tzfw_coherent_mem) |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 176 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 177 | __COHERENT_RAM_END_UNALIGNED__ = .; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 178 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 179 | /* |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 180 | * Memory page(s) mapped to this section will be marked as device |
| 181 | * memory. No other unexpected data must creep in. Ensure the rest of |
| 182 | * the current memory page is unused. |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 183 | */ |
Roberto Vargas | d93fde3 | 2018-04-11 11:53:31 +0100 | [diff] [blame] | 184 | . = ALIGN(PAGE_SIZE); |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 185 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 186 | __COHERENT_RAM_END__ = .; |
| 187 | } >RAM |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 188 | #endif /* USE_COHERENT_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 189 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 190 | __RW_END__ = .; |
| 191 | __BL2_END__ = .; |
| 192 | |
Masahiro Yamada | 65d699d | 2020-01-17 13:45:02 +0900 | [diff] [blame] | 193 | /DISCARD/ : { |
| 194 | *(.dynsym .dynstr .hash .gnu.hash) |
| 195 | } |
| 196 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 197 | #if BL2_IN_XIP_MEM |
| 198 | __BL2_RAM_START__ = ADDR(.data); |
| 199 | __BL2_RAM_END__ = .; |
| 200 | |
| 201 | __DATA_ROM_START__ = LOADADDR(.data); |
| 202 | __DATA_SIZE__ = SIZEOF(.data); |
| 203 | |
| 204 | /* |
| 205 | * The .data section is the last PROGBITS section so its end marks the end |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 206 | * of BL2's RO content in XIP memory. |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 207 | */ |
| 208 | __BL2_ROM_END__ = __DATA_ROM_START__ + __DATA_SIZE__; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 209 | |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 210 | ASSERT(__BL2_ROM_END__ <= BL2_RO_LIMIT, |
| 211 | "BL2's RO content has exceeded its limit.") |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 212 | #endif /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 213 | |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 214 | __BSS_SIZE__ = SIZEOF(.bss); |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 215 | |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 216 | #if USE_COHERENT_MEM |
| 217 | __COHERENT_RAM_UNALIGNED_SIZE__ = |
| 218 | __COHERENT_RAM_END_UNALIGNED__ - __COHERENT_RAM_START__; |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 219 | #endif /* USE_COHERENT_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 220 | |
Harrison Mutai | b6f9a2b | 2023-04-19 10:08:56 +0100 | [diff] [blame] | 221 | RAM_REGION_END = .; |
Jiafei Pan | 43a7bf4 | 2018-03-21 07:20:09 +0000 | [diff] [blame] | 222 | #if BL2_IN_XIP_MEM |
| 223 | ASSERT(. <= BL2_RW_LIMIT, "BL2's RW content has exceeded its limit.") |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 224 | #else /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 225 | ASSERT(. <= BL2_LIMIT, "BL2 image has exceeded its limit.") |
Chris Kay | 4b7660a | 2022-09-29 14:36:53 +0100 | [diff] [blame] | 226 | #endif /* BL2_IN_XIP_MEM */ |
Roberto Vargas | e0e9946 | 2017-10-30 14:43:43 +0000 | [diff] [blame] | 227 | } |