1 /* 2 * Copyright (c) 2009-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: 2009-12-22 13 * Description: UniProton配置私有文件。 14 */ 15 #ifndef PRT_CONFIG_INTERNAL_H 16 #define PRT_CONFIG_INTERNAL_H 17 18 #include <stdint.h> 19 #include "prt_config.h" 20 #include "prt_sys.h" 21 #include "prt_task.h" 22 #include "prt_sem.h" 23 #include "prt_tick.h" 24 #include "prt_exc.h" 25 #include "prt_cpup.h" 26 #include "prt_mem.h" 27 #include "prt_hook.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif /* __cpluscplus */ 33 #endif /* __cpluscplus */ 34 35 #define WORD_PACK(val) (((val) << 24) | ((val) << 16) | ((val) << 8) | (val)) 36 37 enum OsinitPhaseId { 38 OS_REGISTER_ID = 0, 39 OS_INIT_ID, 40 OS_MOUDLE_CONFIG 41 }; 42 43 extern U8 m_aucMemRegion00[OS_MEM_FSC_PT_SIZE] ; /* 私有静态内存分区(缺省) */ 44 45 /* UniProton模块注册函数的声明 */ 46 extern U32 OsFscMemInit(U32 addr, U32 size); 47 extern U32 OsSysRegister(struct SysModInfo *modInfo); 48 extern U32 OsTickRegister(struct TickModInfo *modInfo); 49 extern U32 OsTskRegister(struct TskModInfo *modInfo); 50 extern U32 OsCpupRegister(struct CpupModInfo *modInfo); 51 extern U32 OsSemRegister(const struct SemModInfo *modInfo); 52 extern U32 OsHookRegister(struct HookModInfo *modInfo); 53 54 extern U32 OsHwiConfigInit(void); 55 extern U32 OsTickConfigInit(void); 56 extern U32 OsTskInit(void); 57 extern U32 OsCpupInit(void); 58 extern void OsCpupWarnInit(void); 59 extern U32 OsExcConfigInit(void); 60 extern U32 OsSemInit(void); 61 extern U32 OsHookConfigInit(void); 62 63 /* UniProton系统启动相关函数的声明 */ 64 extern void OsHwInit(void); 65 extern U32 OsActivate(void); 66 extern U32 OsTickStart(void); 67 extern U32 PRT_HardDrvInit(void); 68 /* Notes: PRT_HardBootInit接口在栈保护支持随机数设置场景下必须在bss初始化后调用 */ 69 extern void PRT_HardBootInit(void); 70 extern U32 PRT_AppInit(void); 71 72 extern U32 OsQueueRegister(U16 maxQueue); 73 extern U32 OsQueueConfigInit(void); 74 75 #if (OS_INCLUDE_TICK_SWTMER == YES) 76 extern U32 OsSwTmrInit(U32 maxTimerNum); 77 #endif 78 79 typedef U32 (*ConfigInitFunc)(void); 80 struct OsModuleConfigInfo { 81 enum MoudleId moudleId; 82 ConfigInitFunc moudleConfigFunc[OS_MOUDLE_CONFIG]; 83 }; 84 85 extern S32 OsConfigStart(void); 86 #ifdef __cplusplus 87 #if __cplusplus 88 } 89 #endif /* __cpluscplus */ 90 #endif /* __cpluscplus */ 91 92 #endif /* PRT_CONFIG_INTERNAL_H */ 93