1;/* 2; * Copyright (c) 2009-2024 Arm Limited 3; * Copyright (c) 2022-2023 Cypress Semiconductor Corporation (an Infineon company) 4; * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 5; * 6; * Licensed under the Apache License, Version 2.0 (the "License"); 7; * you may not use this file except in compliance with the License. 8; * You may obtain a copy of the License at 9; * 10; * http://www.apache.org/licenses/LICENSE-2.0 11; * 12; * Unless required by applicable law or agreed to in writing, software 13; * distributed under the License is distributed on an "AS IS" BASIS, 14; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15; * See the License for the specific language governing permissions and 16; * limitations under the License. 17; * 18; * 19; * This file is derivative of CMSIS V5.00 gcc_arm.ld 20; */ 21 22/***********{{utilities.donotedit_warning}}***********/ 23 24/* Linker script to configure memory regions. */ 25/* This file will be run trough the pre-processor. */ 26 27#include "region_defs.h" 28 29/* Include file with definitions for section alignments. 30 * Note: it should be included after region_defs.h to let platform define 31 * default values if needed. */ 32#include "tfm_s_linker_alignments.h" 33 34MEMORY 35{ 36 FLASH (rx) : ORIGIN = S_CODE_START, LENGTH = S_CODE_SIZE 37 RAM (rw) : ORIGIN = S_DATA_START, LENGTH = S_DATA_SIZE 38#if defined(S_RAM_CODE_START) 39 CODE_RAM (rwx) : ORIGIN = S_RAM_CODE_START, LENGTH = S_RAM_CODE_SIZE 40#endif 41} 42 43__msp_stack_size__ = S_MSP_STACK_SIZE; 44 45ENTRY(Reset_Handler) 46 47SECTIONS 48{ 49 /* Start address of the code. */ 50 Image$$PT_RO_START$$Base = ADDR(.TFM_VECTORS); 51 52 .TFM_VECTORS : ALIGN(4) 53 { 54 __vectors_start__ = .; 55 KEEP(*(.vectors)) 56 __vectors_end__ = .; 57 . = ALIGN(4); 58 } > FLASH 59 60 ASSERT(__vectors_start__ != __vectors_end__, ".vectors should not be empty") 61 62#ifdef CONFIG_TFM_USE_TRUSTZONE 63 ASSERT(. <= ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE, ".TFM_VECTORS section size overflow.") 64 . = ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE; 65 /* 66 * Place the CMSE Veneers (containing the SG instruction) after the code, in 67 * a separate at least 32 bytes aligned region so that the SAU can 68 * programmed to just set this region as Non-Secure Callable. 69 */ 70 .gnu.sgstubs ALIGN(TFM_LINKER_VENEERS_ALIGNMENT) : 71 { 72 *(.gnu.sgstubs*) 73 } > FLASH 74 Image$$ER_VENEER$$Base = ADDR(.gnu.sgstubs); 75 Image$$VENEER_ALIGN$$Limit = ALIGN(TFM_LINKER_VENEERS_ALIGNMENT); 76 77 /* GCC always places veneers at the end of .gnu.sgstubs section, so the only 78 * way to align the end of .gnu.sgstubs section is to align start of the 79 * next section */ 80 81 /**** Section for holding partition RO load data */ 82 /* 83 * Sort the partition info by priority to guarantee the initing order. 84 * The first loaded partition will be inited at last in SFN model. 85 */ 86 .TFM_SP_LOAD_LIST ALIGN(TFM_LINKER_VENEERS_ALIGNMENT) : 87#else 88 .TFM_SP_LOAD_LIST ALIGN(4) : 89#endif 90 { 91 KEEP(*(.part_load_priority_00)) 92 KEEP(*(.part_load_priority_01)) 93 KEEP(*(.part_load_priority_02)) 94 KEEP(*(.part_load_priority_03)) 95 } > FLASH 96 Image$$TFM_SP_LOAD_LIST$$RO$$Base = ADDR(.TFM_SP_LOAD_LIST); 97 Image$$TFM_SP_LOAD_LIST$$RO$$Limit = ADDR(.TFM_SP_LOAD_LIST) + SIZEOF(.TFM_SP_LOAD_LIST); 98 99 /**** PSA RoT RO CODE + RO-data starts here */ 100 . = ALIGN(TFM_LINKER_PSA_ROT_LINKER_CODE_ALIGNMENT); 101{% for partition in partitions %} 102 {% if partition.manifest.type == 'PSA-ROT' %} 103 .{{partition.manifest.name}}_RO ALIGN(TFM_LINKER_PSA_ROT_LINKER_CODE_ALIGNMENT) : 104 { 105 {% if partition.attr.linker_pattern.library_list %} 106 {% for pattern in partition.attr.linker_pattern.library_list %} 107 {{pattern}}:(SORT_BY_ALIGNMENT(.text*)) 108 {{pattern}}:(SORT_BY_ALIGNMENT(.rodata*)) 109 {% endfor %} 110 {% endif %} 111 {% if partition.attr.linker_pattern.object_list %} 112 {% for pattern in partition.attr.linker_pattern.object_list %} 113 {{pattern}}(SORT_BY_ALIGNMENT(.text*)) 114 {{pattern}}:(SORT_BY_ALIGNMENT(.rodata*)) 115 {% endfor %} 116 {% endif %} 117 *({{partition.manifest.name}}_PSA-ROT_ATTR_FN) 118 . = ALIGN(TFM_LINKER_PSA_ROT_LINKER_CODE_ALIGNMENT); 119 } > FLASH 120 Image$${{partition.manifest.name}}_RO$$Base = ADDR(.{{partition.manifest.name}}_RO); 121 Image$${{partition.manifest.name}}_RO$$Limit = ADDR(.{{partition.manifest.name}}_RO) + SIZEOF(.{{partition.manifest.name}}_RO); 122 123 {% endif %} 124{% endfor %} 125 /**** PSA RoT RO CODE + data ends here */ 126 127 /**** APPLICATION RoT RO CODE + data starts here */ 128{% for partition in partitions %} 129 {% if partition.manifest.type == 'APPLICATION-ROT' %} 130 .{{partition.manifest.name}}_RO ALIGN(TFM_LINKER_APP_ROT_LINKER_CODE_ALIGNMENT) : 131 { 132 {% if partition.attr.linker_pattern.library_list %} 133 {% for pattern in partition.attr.linker_pattern.library_list %} 134 {{pattern}}:(SORT_BY_ALIGNMENT(.text*)) 135 {{pattern}}:(SORT_BY_ALIGNMENT(.rodata*)) 136 {% endfor %} 137 {% endif %} 138 {% if partition.attr.linker_pattern.object_list %} 139 {% for pattern in partition.attr.linker_pattern.object_list %} 140 {{pattern}}(SORT_BY_ALIGNMENT(.text*)) 141 {{pattern}}:(SORT_BY_ALIGNMENT(.rodata*)) 142 {% endfor %} 143 {% endif %} 144 *({{partition.manifest.name}}_APP-ROT_ATTR_FN) 145 . = ALIGN(TFM_LINKER_APP_ROT_LINKER_CODE_ALIGNMENT); 146 } > FLASH 147 Image$${{partition.manifest.name}}_CODE$$Base = ADDR(.{{partition.manifest.name}}_RO); 148 Image$${{partition.manifest.name}}_CODE$$Limit = ADDR(.{{partition.manifest.name}}_RO) + SIZEOF(.{{partition.manifest.name}}_RO); 149 150 {% endif %} 151{% endfor %} 152 /**** APPLICATION RoT RO CODE + data ends here */ 153 154#if defined(S_RAM_CODE_START) 155 /* Flash drivers code that gets copied from Flash */ 156 .ER_CODE_SRAM ALIGN(S_RAM_CODE_START, 4) : 157 { 158 *libflash_drivers*:(SORT_BY_ALIGNMENT(.text*)) 159 *libflash_drivers*:(SORT_BY_ALIGNMENT(.rodata*)) 160 KEEP(*(.ramfunc)) 161 . = ALIGN(4); /* This alignment is needed to make the section size 4 bytes aligned */ 162 } > CODE_RAM AT > FLASH 163 Image$$ER_CODE_SRAM$$Base = ADDR(.ER_CODE_SRAM); 164 Image$$ER_CODE_SRAM$$Limit = ADDR(.ER_CODE_SRAM) + SIZEOF(.ER_CODE_SRAM); 165#endif 166 167 .ER_TFM_CODE (READONLY) : ALIGN(4) 168 { 169 . = ALIGN(4); 170 /* preinit data */ 171 PROVIDE_HIDDEN (__preinit_array_start = .); 172 KEEP(*(.preinit_array)) 173 PROVIDE_HIDDEN (__preinit_array_end = .); 174 175 . = ALIGN(4); 176 /* init data */ 177 PROVIDE_HIDDEN (__init_array_start = .); 178 KEEP(*(SORT(.init_array.*))) 179 KEEP(*(.init_array)) 180 PROVIDE_HIDDEN (__init_array_end = .); 181 182 . = ALIGN(4); 183 /* finit data */ 184 PROVIDE_HIDDEN (__fini_array_start = .); 185 KEEP(*(SORT(.fini_array.*))) 186 KEEP(*(.fini_array)) 187 PROVIDE_HIDDEN (__fini_array_end = .); 188 189 /* .copy.table */ 190 . = ALIGN(4); 191 __copy_table_start__ = .; 192#ifdef RAM_VECTORS_SUPPORT 193 /* Copy interrupt vectors from flash to RAM */ 194 LONG (__vectors_start__) /* From */ 195 LONG (__ram_vectors_start__) /* To */ 196 LONG ((__vectors_end__ - __vectors_start__) / 4) /* Size */ 197#endif 198 LONG (LOADADDR(.spm_data)) 199 LONG (ADDR(.spm_data)) 200 LONG (SIZEOF(.spm_data) / 4) 201 LONG (LOADADDR(.TFM_DATA)) 202 LONG (ADDR(.TFM_DATA)) 203 LONG (SIZEOF(.TFM_DATA) / 4) 204{% for partition in partitions %} 205 LONG (LOADADDR(.ER_{{partition.manifest.name}}_RWZI)) 206 LONG (ADDR(.ER_{{partition.manifest.name}}_RWZI)) 207 LONG (SIZEOF(.ER_{{partition.manifest.name}}_RWZI) / 4) 208{% endfor %} 209#if defined(S_RAM_CODE_START) 210 LONG (LOADADDR(.ER_CODE_SRAM)) 211 LONG (ADDR(.ER_CODE_SRAM)) 212 LONG (SIZEOF(.ER_CODE_SRAM) / 4) 213#endif 214 __copy_table_end__ = .; 215 216 /* .zero.table */ 217 . = ALIGN(4); 218 __zero_table_start__ = .; 219 LONG (ADDR(.spm_bss)) 220 LONG (SIZEOF(.spm_bss) / 4) 221#if defined(CONFIG_TFM_PARTITION_META) 222 LONG (ADDR(.TFM_SP_META_PTR)) 223 LONG (SIZEOF(.TFM_SP_META_PTR) / 4) 224#endif 225 LONG (ADDR(.TFM_BSS)) 226 LONG (SIZEOF(.TFM_BSS) / 4) 227{% for partition in partitions %} 228 LONG (ADDR(.{{partition.manifest.name}}_RWZI_BSS)) 229 LONG (SIZEOF(.{{partition.manifest.name}}_RWZI_BSS) / 4) 230{% endfor %} 231 __zero_table_end__ = .; 232 233 *startup*(.text*) 234 *libplatform_s*:(SORT_BY_ALIGNMENT(.text*)) 235 *libtfm_spm*:(SORT_BY_ALIGNMENT(.text*)) 236 237 *libplatform_s*:(SORT_BY_ALIGNMENT(.rodata*)) 238 *libtfm_spm*:(SORT_BY_ALIGNMENT(.rodata*)) 239 } > FLASH 240 241 /**** Unprivileged Secure code starts here */ 242 .ER_UNPRIV_CODE ALIGN(TFM_LINKER_UNPRIV_CODE_ALIGNMENT) : 243 { 244 *(SORT_BY_ALIGNMENT(.text*)) 245 246 KEEP(*(.init)) 247 KEEP(*(.fini)) 248 249 /* .ctors */ 250 *crtbegin.o(.ctors) 251 *crtbegin?.o(.ctors) 252 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) 253 *(SORT(.ctors.*)) 254 *(.ctors) 255 256 /* .dtors */ 257 *crtbegin.o(.dtors) 258 *crtbegin?.o(.dtors) 259 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) 260 *(SORT(.dtors.*)) 261 *(.dtors) 262 263 *(SORT_BY_ALIGNMENT(.rodata*)) 264 265 KEEP(*(.eh_frame*)) 266 267 . = ALIGN(TFM_LINKER_UNPRIV_CODE_ALIGNMENT); 268 } > FLASH 269 Image$$TFM_UNPRIV_CODE_START$$RO$$Base = ADDR(.ER_UNPRIV_CODE); 270 Image$$TFM_UNPRIV_CODE_END$$RO$$Limit = ADDR(.ER_UNPRIV_CODE) + SIZEOF(.ER_UNPRIV_CODE); 271 272 /* Position tag */ 273 . = ALIGN(TFM_LINKER_PT_RO_ALIGNMENT); 274 Image$$PT_RO_END$$Base = .; 275 276 .ARM.extab : 277 { 278 *(.ARM.extab* .gnu.linkonce.armextab.*) 279 } > FLASH 280 281 __exidx_start = .; 282 .ARM.exidx : 283 { 284 *(.ARM.exidx* .gnu.linkonce.armexidx.*) 285 } > FLASH 286 __exidx_end = .; 287 288 /**** Base address of secure data area */ 289 .tfm_secure_data_start : 290 { 291 /* Relocate current position to RAM */ 292 . = ALIGN(4); 293 } > RAM 294 295 /* Position tag */ 296 . = ALIGN(TFM_LINKER_PT_PRIV_RWZI_ALIGNMENT); 297 Image$$PT_PRIV_RWZI_START$$Base = .; 298 299 /* shared_data and msp_stack are overlapping on purpose when 300 * msp_stack is extended until the beginning of RAM, when shared_date 301 * was read out by partitions 302 */ 303 .tfm_bl2_shared_data ALIGN(TFM_LINKER_BL2_SHARED_DATA_ALIGNMENT) : 304 { 305 . += BOOT_TFM_SHARED_DATA_SIZE; 306 } > RAM 307 308 .msp_stack ALIGN(TFM_LINKER_MSP_STACK_ALIGNMENT) : 309 { 310 . += __msp_stack_size__ - 0x8; 311 } > RAM 312 Image$$ARM_LIB_STACK$$ZI$$Base = ADDR(.msp_stack); 313 Image$$ARM_LIB_STACK$$ZI$$Limit = ADDR(.msp_stack) + SIZEOF(.msp_stack); 314 315 .msp_stack_seal_res : 316 { 317 . += 0x8; 318 } > RAM 319 __StackSeal = ADDR(.msp_stack_seal_res); 320 321#if defined(ENABLE_HEAP) 322 __heap_size__ = S_HEAP_SIZE; 323 .heap ALIGN(8) : 324 { 325 __end__ = .; 326 PROVIDE(end = .); 327 __HeapBase = .; 328 . += __heap_size__; 329 __HeapLimit = .; 330 __heap_limit = .; /* Add for _sbrk */ 331 } > RAM 332#endif 333 334 .spm_data : 335 { 336 *libtfm_spm*:*(.data*); 337 . = ALIGN(4); 338 } > RAM AT> FLASH 339 .spm_bss (NOLOAD): 340 { 341 *libtfm_spm*:(SORT_BY_ALIGNMENT(.bss*)); 342 . = ALIGN(4); 343 } > RAM AT> RAM 344 345 /**** PSA RoT DATA start here */ 346{% for partition in partitions %} 347 {% if partition.manifest.type == 'PSA-ROT' %} 348 349 /* Position tag */ 350 . = ALIGN(TFM_LINKER_PSA_ROT_LINKER_DATA_ALIGNMENT); 351 Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_START$$Base = .; 352 353 .ER_{{partition.manifest.name}}_RWZI ALIGN(TFM_LINKER_PSA_ROT_LINKER_DATA_ALIGNMENT) : 354 { 355 {% if partition.attr.linker_pattern.library_list %} 356 {% for pattern in partition.attr.linker_pattern.library_list %} 357 {{pattern}}:(SORT_BY_ALIGNMENT(.data*)) 358 {% endfor %} 359 {% endif %} 360 {% if partition.attr.linker_pattern.object_list %} 361 {% for pattern in partition.attr.linker_pattern.object_list %} 362 {{pattern}}(SORT_BY_ALIGNMENT(.data*)) 363 {% endfor %} 364 {% endif %} 365 *({{partition.manifest.name}}_PSA-ROT_ATTR_RW) 366 . = ALIGN(4); 367 } > RAM AT> FLASH 368 Image$$ER_{{partition.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{partition.manifest.name}}_RWZI); 369 Image$$ER_{{partition.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{partition.manifest.name}}_RWZI) + SIZEOF(.ER_{{partition.manifest.name}}_RWZI); 370 371 .{{partition.manifest.name}}_RWZI_BSS ALIGN(4) (NOLOAD): 372 { 373 start_of_{{partition.manifest.name}}_RWZI = .; 374 {% if partition.attr.linker_pattern.library_list %} 375 {% for pattern in partition.attr.linker_pattern.library_list %} 376 {{pattern}}:(SORT_BY_ALIGNMENT(.bss*)) 377 {{pattern}}:*(COMMON) 378 {% endfor %} 379 {% endif %} 380 {% if partition.attr.linker_pattern.object_list %} 381 {% for pattern in partition.attr.linker_pattern.object_list %} 382 {{pattern}}(.bss*) 383 {{pattern}}(COMMON) 384 {% endfor %} 385 {% endif %} 386 *({{partition.manifest.name}}_PSA-ROT_ATTR_ZI) 387 . += (. - start_of_{{partition.manifest.name}}_RWZI) ? 0 : 4; 388 . = ALIGN(TFM_LINKER_PSA_ROT_LINKER_DATA_ALIGNMENT); 389 } > RAM AT> RAM 390 Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{partition.manifest.name}}_RWZI_BSS); 391 Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{partition.manifest.name}}_RWZI_BSS) + SIZEOF(.{{partition.manifest.name}}_RWZI_BSS); 392 393 /* Position tag */ 394 . = ALIGN(TFM_LINKER_PSA_ROT_LINKER_DATA_ALIGNMENT); 395 Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_END$$Base = .; 396 397 {% endif %} 398{% endfor %} 399 /**** PSA RoT DATA end here */ 400 . = ALIGN(TFM_LINKER_PT_PRIV_RWZI_ALIGNMENT); 401 402 /* Position tag */ 403 Image$$PT_PRIV_RWZI_END$$Base = .; 404 405 /**** APPLICATION RoT DATA start here */ 406{% for partition in partitions %} 407 {% if partition.manifest.type == 'APPLICATION-ROT' %} 408 /* Position tag */ 409 . = ALIGN(TFM_LINKER_APP_ROT_LINKER_DATA_ALIGNMENT); 410 Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_START$$Base = .; 411 412 .ER_{{partition.manifest.name}}_RWZI ALIGN(TFM_LINKER_APP_ROT_LINKER_DATA_ALIGNMENT) : 413 { 414 {% if partition.attr.linker_pattern.library_list %} 415 {% for pattern in partition.attr.linker_pattern.library_list %} 416 {{pattern}}:*(.data*) 417 {% endfor %} 418 {% endif %} 419 {% if partition.attr.linker_pattern.object_list %} 420 {% for pattern in partition.attr.linker_pattern.object_list %} 421 {{pattern}}(SORT_BY_ALIGNMENT(.data*)) 422 {% endfor %} 423 {% endif %} 424 *({{partition.manifest.name}}_APP-ROT_ATTR_RW) 425 . = ALIGN(4); 426 } > RAM AT> FLASH 427 Image$$.ER_{{partition.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{partition.manifest.name}}_RWZI); 428 Image$$.ER_{{partition.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{partition.manifest.name}}_RWZI) + SIZEOF(.ER_{{partition.manifest.name}}_RWZI); 429 430 .{{partition.manifest.name}}_RWZI_BSS ALIGN(4) (NOLOAD): 431 { 432 start_of_{{partition.manifest.name}}_RWZI = .; 433 {% if partition.attr.linker_pattern.library_list %} 434 {% for pattern in partition.attr.linker_pattern.library_list %} 435 {{pattern}}:(SORT_BY_ALIGNMENT(.bss*)) 436 {{pattern}}:*(COMMON) 437 {% endfor %} 438 {% endif %} 439 {% if partition.attr.linker_pattern.object_list %} 440 {% for pattern in partition.attr.linker_pattern.object_list %} 441 {{pattern}}(SORT_BY_ALIGNMENT(.bss*)) 442 {{pattern}}(COMMON) 443 {% endfor %} 444 {% endif %} 445 *({{partition.manifest.name}}_APP-ROT_ATTR_ZI) 446 . += (. - start_of_{{partition.manifest.name}}_RWZI) ? 0 : 4; 447 . = ALIGN(TFM_LINKER_APP_ROT_LINKER_DATA_ALIGNMENT); 448 } > RAM AT> RAM 449 Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{partition.manifest.name}}_RWZI_BSS); 450 Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{partition.manifest.name}}_RWZI_BSS) + SIZEOF(.{{partition.manifest.name}}_RWZI_BSS); 451 452 /* Position tag */ 453 . = ALIGN(TFM_LINKER_APP_ROT_LINKER_DATA_ALIGNMENT); 454 Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_END$$Base = .; 455 456 {% endif %} 457{% endfor %} 458 /**** APPLICATION RoT DATA end here */ 459 460 /* Position tag */ 461 . = ALIGN(TFM_LINKER_APP_ROT_LINKER_DATA_ALIGNMENT); 462 Image$$PT_APP_RWZI_END$$Base = .; 463 464#ifdef RAM_VECTORS_SUPPORT 465 .ramVectors ALIGN(TFM_LINKER_RAM_VECTORS_ALIGNMENT) (NOLOAD) : 466 { 467 __ram_vectors_start__ = .; 468 KEEP(*(.ram_vectors)) 469 __ram_vectors_end__ = .; 470 } > RAM 471 .TFM_DATA __ram_vectors_end__ : 472#else 473 474 .TFM_DATA ALIGN(4) : 475#endif 476 { 477 *(SORT_BY_ALIGNMENT(.data*)) 478 479 KEEP(*(.jcr*)) 480 . = ALIGN(4); 481 482 } > RAM AT> FLASH 483 Image$$ER_TFM_DATA$$RW$$Base = ADDR(.TFM_DATA); 484 Image$$ER_TFM_DATA$$RW$$Limit = ADDR(.TFM_DATA) + SIZEOF(.TFM_DATA); 485 486#if defined(CONFIG_TFM_PARTITION_META) 487 .TFM_SP_META_PTR ALIGN(TFM_LINKER_SP_META_PTR_ALIGNMENT) : 488 { 489 *(.bss.SP_META_PTR_SPRTL_INST) 490 . = ALIGN(TFM_LINKER_SP_META_PTR_ALIGNMENT); 491 } > RAM AT> RAM 492 Image$$TFM_SP_META_PTR$$ZI$$Base = ADDR(.TFM_SP_META_PTR); 493 Image$$TFM_SP_META_PTR$$ZI$$Limit = ADDR(.TFM_SP_META_PTR) + SIZEOF(.TFM_SP_META_PTR); 494 /* This is needed for the uniform configuration of MPU region. */ 495 Image$$TFM_SP_META_PTR_END$$ZI$$Limit = Image$$TFM_SP_META_PTR$$ZI$$Limit; 496#endif 497 498 .TFM_BSS ALIGN(4) (NOLOAD): 499 { 500 __bss_start__ = .; 501 502 /* The runtime partition placed order is same as load partition */ 503 __partition_runtime_start__ = .; 504 KEEP(*(.bss.part_runtime_priority_00)) 505 KEEP(*(.bss.part_runtime_priority_01)) 506 KEEP(*(.bss.part_runtime_priority_02)) 507 KEEP(*(.bss.part_runtime_priority_03)) 508 __partition_runtime_end__ = .; 509 . = ALIGN(4); 510 511 /* The runtime service placed order is same as load partition */ 512 __service_runtime_start__ = .; 513 KEEP(*(.bss.serv_runtime_priority_00)) 514 KEEP(*(.bss.serv_runtime_priority_01)) 515 KEEP(*(.bss.serv_runtime_priority_02)) 516 KEEP(*(.bss.serv_runtime_priority_03)) 517 __service_runtime_end__ = .; 518 *(SORT_BY_ALIGNMENT(.bss*)) 519 *(COMMON) 520 . = ALIGN(4); 521 __bss_end__ = .; 522 } > RAM AT> RAM 523 Image$$ER_TFM_DATA$$ZI$$Base = ADDR(.TFM_BSS); 524 Image$$ER_TFM_DATA$$ZI$$Limit = ADDR(.TFM_BSS) + SIZEOF(.TFM_BSS); 525 Image$$ER_PART_RT_POOL$$ZI$$Base = __partition_runtime_start__; 526 Image$$ER_PART_RT_POOL$$ZI$$Limit = __partition_runtime_end__; 527 Image$$ER_SERV_RT_POOL$$ZI$$Base = __service_runtime_start__; 528 Image$$ER_SERV_RT_POOL$$ZI$$Limit = __service_runtime_end__; 529 530 Image$$ER_TFM_DATA$$Base = ADDR(.TFM_DATA); 531 Image$$ER_TFM_DATA$$Limit = ADDR(.TFM_DATA) + SIZEOF(.TFM_DATA) + SIZEOF(.TFM_BSS); 532 533 Load$$LR$$LR_NS_PARTITION$$Base = NS_PARTITION_START; 534 535#ifdef BL2 536 Load$$LR$$LR_SECONDARY_PARTITION$$Base = SECONDARY_PARTITION_START; 537#endif /* BL2 */ 538 539 PROVIDE(__stack = Image$$ARM_LIB_STACK$$ZI$$Limit); 540} 541