1/* 2 * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#include "region_defs.h" 18 19LR_CODE BL2_CODE_START { 20 21 ER_CODE (BL2_CODE_START) FIXED (BL2_CODE_SIZE) { 22 *.o (RESET +First) 23 .ANY (+RO) 24 } 25 26 ER_NOHDP_CODE (BL2_NOHDP_CODE_START) FIXED (BL2_NOHDP_CODE_SIZE) { 27 *(.BL2_NoHDP_Data) 28 *(.BL2_NoHdp_Code) 29 mpu_armv8m_drv.o (+RO) 30 *(.BL2_Error_Code, +LAST) 31 } 32 33 ER_DATA (BL2_DATA_START) { 34 .ANY (+ZI +RW) 35 } 36 37 /* MSP */ 38 ARM_LIB_STACK +0 ALIGN 32 EMPTY BL2_MSP_STACK_SIZE { 39 } 40 41 ARM_LIB_HEAP +0 ALIGN 8 EMPTY BL2_HEAP_SIZE { 42 } 43 /* This empty, zero long execution region is here to mark the limit address 44 * of the last execution region that is allocated in SRAM. 45 */ 46 SRAM_WATERMARK +0 EMPTY 0x0 { 47 } 48 49 /* Make sure that the sections allocated in the SRAM does not exceed the 50 * size of the SRAM available. 51 */ 52 ScatterAssert(ImageLimit(SRAM_WATERMARK) <= BL2_DATA_START + BL2_DATA_SIZE) 53} 54 55#if defined(BL2_OTP_AREA_BASE) 56 57ER_OTP BL2_OTP_AREA_BASE { 58 ER_OTP_CONST (BL2_OTP_AREA_BASE) FIXED (BL2_OTP_AREA_SIZE) { 59 *(.BL2_OTP_Const) 60 } 61} 62 63#endif 64 65#if defined(BL2_NVM_AREA_BASE) 66 67ER_NVM BL2_NVM_AREA_BASE { 68 ER_NVM_CONST (BL2_NVM_AREA_BASE) FIXED (BL2_NVM_AREA_SIZE) { 69 *(.BL2_NVM_Const) 70 } 71} 72 73#endif 74#if defined(BL2_NVMCNT_AREA_BASE) 75 76ER_NVMCNT BL2_NVMCNT_AREA_BASE { 77 ER_NVMCNT_CONST (BL2_NVMCNT_AREA_BASE) FIXED (BL2_NVMCNT_AREA_SIZE) { 78 *(.BL2_NVMCNT_Const) 79 } 80} 81 82#endif