1#include "region_defs.h"
2
3do not initialize  { section .noinit };
4initialize by copy  with packing = none {  readwrite };
5
6define block ER_CODE with fixed order, alignment = 8 {
7       section .intvec,
8       readonly
9       };
10
11define block LR_CODE with fixed order, maximum size = BL2_CODE_SIZE {block ER_CODE};
12place at address BL2_CODE_START {block LR_CODE};
13
14define block ER_NOHDP_CODE with fixed order, alignment = 8 {
15                                readonly section .BL2_NoHdp_Data,
16                                readonly section .BL2_NoHdp_Code,
17                                readonly object mpu_armv8m_drv.o,
18                                readonly section .BL2_Error_Code};
19
20define block LR_NOHDP_CODE with fixed order, maximum size = BL2_NOHDP_CODE_SIZE {block ER_NOHDP_CODE};
21place at address BL2_NOHDP_CODE_START {block LR_NOHDP_CODE};
22#if defined(BL2_OTP_AREA_BASE)
23define block LR_OTP_CONST {
24                                readonly object otp_provision.o
25                          };
26place at address BL2_OTP_AREA_BASE  {block LR_OTP_CONST};
27#endif
28#if defined(BL2_NVM_AREA_BASE)
29define block LR_NVM_INIT {
30                                readonly object nvm_init.o
31                          };
32place at address BL2_NVM_AREA_BASE  {block LR_NVM_INIT};
33#endif
34#if defined(BL2_NVMCNT_AREA_BASE)
35define block LR_NVMCNT_INIT {
36                                readonly object nvmcnt_init.o
37                          };
38place at address BL2_NVMCNT_AREA_BASE  {block LR_NVMCNT_INIT};
39#endif
40define block ER_DATA            with alignment = 32 {readwrite};
41define block ARM_LIB_STACK      with alignment = 32, size = BL2_MSP_STACK_SIZE { };
42define block HEAP               with alignment = 8, size = BL2_HEAP_SIZE { };
43define block ARM_LIB_HEAP       with alignment = 8, size = BL2_HEAP_SIZE { };
44define overlay HEAP_OVL         {block HEAP};
45define overlay HEAP_OVL         {block ARM_LIB_HEAP};
46keep {block ER_DATA, block ARM_LIB_STACK,
47      block HEAP, block ARM_LIB_HEAP};
48
49if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
50{
51  // Required in a multi-threaded application
52  initialize by copy with packing = none { section __DLIB_PERTHREAD };
53}
54
55define block DATA with fixed order, maximum size = BL2_DATA_SIZE {
56       block ER_DATA,
57       block ARM_LIB_STACK,
58       overlay HEAP_OVL
59};
60
61place at address BL2_DATA_START {block DATA};
62