diff options
| author | tangyuxin <[email protected]> | 2021-02-01 16:53:39 +0800 |
|---|---|---|
| committer | tangyuxin <[email protected]> | 2021-02-01 16:53:39 +0800 |
| commit | 2e9fc0c4ff6fadd62faac32a2604430b1c8a0ae3 (patch) | |
| tree | 7f1098212e29422a6a8a476b21367887bcea8bf0 /libcpu | |
| parent | ef8b984fa1bf1ca0d90aab9404086e843fe352ae (diff) | |
[libcpu][cm33] 安全相关的函数使用宏进行隔离
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/cortex-m33/trustzone.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpu/arm/cortex-m33/trustzone.c b/libcpu/arm/cortex-m33/trustzone.c index 86654a7199..5f37ddbb8f 100644 --- a/libcpu/arm/cortex-m33/trustzone.c +++ b/libcpu/arm/cortex-m33/trustzone.c @@ -10,11 +10,19 @@ #include <rtthread.h> +#ifdef ARM_CM33_ENABLE_TRUSTZONE extern void TZ_InitContextSystem_S(void); extern rt_uint32_t TZ_AllocModuleContext_S (rt_uint32_t module); extern rt_uint32_t TZ_FreeModuleContext_S(rt_uint32_t id); extern rt_uint32_t TZ_LoadContext_S(rt_uint32_t id); extern rt_uint32_t TZ_StoreContext_S(rt_uint32_t id); +#else +void TZ_InitContextSystem_S(void){} +rt_uint32_t TZ_AllocModuleContext_S (rt_uint32_t module){return 0;} +rt_uint32_t TZ_FreeModuleContext_S(rt_uint32_t id) {return 0;} +rt_uint32_t TZ_LoadContext_S(rt_uint32_t id){return 0;}; +rt_uint32_t TZ_StoreContext_S(rt_uint32_t id){return 0;}; +#endif extern int tzcall(int id, rt_ubase_t arg0, rt_ubase_t arg1, rt_ubase_t arg2); #define TZ_INIT_CONTEXT_ID (0x1001) |
