1 /* 2 * Copyright (c) 2023, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __MEMORY_SYMBOLS_H__ 9 #define __MEMORY_SYMBOLS_H__ 10 11 #include "region.h" 12 13 /* 14 * This file contains memory symbols required by TF-M SPM. 15 * 16 * Symbols can be reserved by linkage, or globally defined in a 17 * source file with toolchain-specific flags. 18 */ 19 20 21 /* ---------- SPM boot stack - the default stack when booting up ---------- */ 22 REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Base); 23 REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit); 24 25 #define SPM_BOOT_STACK_TOP \ 26 (uint32_t)®ION_NAME(Image$$, ARM_LIB_STACK, $$ZI$$Base) 27 #define SPM_BOOT_STACK_BOTTOM \ 28 (uint32_t)®ION_NAME(Image$$, ARM_LIB_STACK, $$ZI$$Limit) 29 30 31 /* ----------- ROM loader specific symbols ------------------------ */ 32 /* Partition load data region */ 33 REGION_DECLARE(Image$$, TFM_SP_LOAD_LIST, $$RO$$Base); 34 REGION_DECLARE(Image$$, TFM_SP_LOAD_LIST, $$RO$$Limit); 35 36 /* Partition and service runtime pool region */ 37 REGION_DECLARE(Image$$, ER_PART_RT_POOL, $$ZI$$Base); 38 REGION_DECLARE(Image$$, ER_PART_RT_POOL, $$ZI$$Limit); 39 REGION_DECLARE(Image$$, ER_SERV_RT_POOL, $$ZI$$Base); 40 REGION_DECLARE(Image$$, ER_SERV_RT_POOL, $$ZI$$Limit); 41 42 #define PART_INFOLIST_START \ 43 (uintptr_t)®ION_NAME(Image$$, TFM_SP_LOAD_LIST, $$RO$$Base) 44 #define PART_INFOLIST_END \ 45 (uintptr_t)®ION_NAME(Image$$, TFM_SP_LOAD_LIST, $$RO$$Limit) 46 #define PART_INFORAM_START \ 47 (uintptr_t)®ION_NAME(Image$$, ER_PART_RT_POOL, $$ZI$$Base) 48 #define PART_INFORAM_END \ 49 (uintptr_t)®ION_NAME(Image$$, ER_PART_RT_POOL, $$ZI$$Limit) 50 #define SERV_INFORAM_START \ 51 (uintptr_t)®ION_NAME(Image$$, ER_SERV_RT_POOL, $$ZI$$Base) 52 #define SERV_INFORAM_END \ 53 (uintptr_t)®ION_NAME(Image$$, ER_SERV_RT_POOL, $$ZI$$Limit) 54 55 #endif /* __MEMORY_SYMBOLS_H__ */ 56