1 /* 2 * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. 3 * 4 * UniProton is licensed under Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * http://license.coscl.org.cn/MulanPSL2 8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11 * See the Mulan PSL v2 for more details. 12 * Create: 2022-11-22 13 * Description: 属性宏相关内部头文件 14 */ 15 #ifndef OS_ATTR_ARMV8_EXTERNAL_H 16 #define OS_ATTR_ARMV8_EXTERNAL_H 17 18 /* 定义操作系统的代码数据分段 */ 19 #ifndef CONFIG_OPTION_FX_SECTIONS 20 /* L0表示最高性能内存段 */ 21 #ifndef OS_SEC_L0_TEXT 22 #define OS_SEC_L0_TEXT __attribute__((section(".os.text"))) 23 #endif 24 25 #ifndef OS_SEC_LX0_TEXT 26 #define OS_SEC_LX0_TEXT __attribute__((section(".os.text"))) 27 #endif 28 29 /* OS_SEC_L1_TEXT, L1表示性能敏感内存段,如PL2,默认缺省,不显示指定 */ 30 #ifndef OS_SEC_TEXT 31 #define OS_SEC_TEXT __attribute__((section(".os.text"))) 32 #endif 33 34 #ifndef OS_SEC_L2_TEXT 35 #define OS_SEC_L2_TEXT __attribute__((section(".os.minor.text"))) 36 #endif 37 38 #ifndef OS_SEC_L4_TEXT 39 #define OS_SEC_L4_TEXT __attribute__((section(".os.init.text"))) 40 #endif 41 42 #ifndef OS_SEC_LX_TEXT 43 #define OS_SEC_LX_TEXT __attribute__((section(".os.init.text"))) 44 #endif 45 46 #ifndef OS_SEC_DATA 47 #define OS_SEC_DATA __attribute__((section(".os.data"))) 48 #endif 49 50 #ifndef OS_SEC_L4_DATA 51 #define OS_SEC_L4_DATA __attribute__((section(".os.data"))) 52 #endif 53 54 #ifndef OS_SEC_BSS 55 #define OS_SEC_BSS __attribute__((section(".os.bss"))) 56 #endif 57 58 #ifndef OS_SEC_L4_BSS 59 #define OS_SEC_L4_BSS __attribute__((section(".os.bss"))) 60 #endif 61 62 #ifndef OS_SEC_L4_INSTSH_DATA 63 #define OS_SEC_L4_INSTSH_DATA __attribute__((section(".os.data"))) 64 #endif 65 #endif /* CONFIG_OPTION_FX_SECTIONS */ 66 67 #endif /* OS_ATTR_ARMV8_EXTERNAL_H */ 68