1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright 2022 NXP 4 */ 5 6 #ifndef __KERNEL_SECURE_PARTITION_H 7 #define __KERNEL_SECURE_PARTITION_H 8 9 #include <assert.h> 10 #include <kernel/embedded_ts.h> 11 #include <kernel/user_mode_ctx_struct.h> 12 #include <stdint.h> 13 14 struct sp_ctx { 15 struct user_mode_ctx uctx; 16 struct ts_ctx ts_ctx; 17 }; 18 is_sp_ctx(struct ts_ctx * ctx __unused)19static inline bool is_sp_ctx(struct ts_ctx *ctx __unused) 20 { 21 return false; 22 } 23 24 static inline struct sp_session *__noprof to_sp_session(struct ts_session * sess __unused)25to_sp_session(struct ts_session *sess __unused) 26 { 27 assert(is_sp_ctx(sess->ctx)); 28 return NULL; 29 } 30 to_sp_ctx(struct ts_ctx * ctx __unused)31static inline struct sp_ctx *to_sp_ctx(struct ts_ctx *ctx __unused) 32 { 33 assert(is_sp_ctx(ctx)); 34 return NULL; 35 } 36 37 #endif /* __KERNEL_SECURE_PARTITION_H */ 38