1 #ifndef _G_SEC2_CONTEXT_NVOC_H_ 2 #define _G_SEC2_CONTEXT_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 11 * SPDX-License-Identifier: MIT 12 * 13 * Permission is hereby granted, free of charge, to any person obtaining a 14 * copy of this software and associated documentation files (the "Software"), 15 * to deal in the Software without restriction, including without limitation 16 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 * and/or sell copies of the Software, and to permit persons to whom the 18 * Software is furnished to do so, subject to the following conditions: 19 * 20 * The above copyright notice and this permission notice shall be included in 21 * all copies or substantial portions of the Software. 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 * DEALINGS IN THE SOFTWARE. 30 */ 31 32 #include "g_sec2_context_nvoc.h" 33 34 #ifndef SEC2_CONTEXT_H 35 #define SEC2_CONTEXT_H 36 37 #include "core/bin_data.h" 38 #include "core/core.h" 39 #include "kernel/gpu/fifo/channel_descendant.h" 40 41 /*! 42 * RM internal class representing NVXXXX_TSEC. Class is used for channel work 43 * submission. 44 */ 45 #ifdef NVOC_SEC2_CONTEXT_H_PRIVATE_ACCESS_ALLOWED 46 #define PRIVATE_FIELD(x) x 47 #else 48 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 49 #endif 50 struct Sec2Context { 51 const struct NVOC_RTTI *__nvoc_rtti; 52 struct ChannelDescendant __nvoc_base_ChannelDescendant; 53 struct Object *__nvoc_pbase_Object; 54 struct RsResource *__nvoc_pbase_RsResource; 55 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 56 struct RmResource *__nvoc_pbase_RmResource; 57 struct GpuResource *__nvoc_pbase_GpuResource; 58 struct INotifier *__nvoc_pbase_INotifier; 59 struct Notifier *__nvoc_pbase_Notifier; 60 struct ChannelDescendant *__nvoc_pbase_ChannelDescendant; 61 struct Sec2Context *__nvoc_pbase_Sec2Context; 62 NV_STATUS (*__sec2ctxCheckMemInterUnmap__)(struct Sec2Context *, NvBool); 63 NvBool (*__sec2ctxShareCallback__)(struct Sec2Context *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 64 NvBool (*__sec2ctxAccessCallback__)(struct Sec2Context *, struct RsClient *, void *, RsAccessRight); 65 NV_STATUS (*__sec2ctxMapTo__)(struct Sec2Context *, RS_RES_MAP_TO_PARAMS *); 66 NV_STATUS (*__sec2ctxGetMapAddrSpace__)(struct Sec2Context *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 67 void (*__sec2ctxSetNotificationShare__)(struct Sec2Context *, struct NotifShare *); 68 NvU32 (*__sec2ctxGetRefCount__)(struct Sec2Context *); 69 void (*__sec2ctxAddAdditionalDependants__)(struct RsClient *, struct Sec2Context *, RsResourceRef *); 70 NV_STATUS (*__sec2ctxControl_Prologue__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 71 NV_STATUS (*__sec2ctxGetRegBaseOffsetAndSize__)(struct Sec2Context *, struct OBJGPU *, NvU32 *, NvU32 *); 72 NV_STATUS (*__sec2ctxInternalControlForward__)(struct Sec2Context *, NvU32, void *, NvU32); 73 NV_STATUS (*__sec2ctxUnmapFrom__)(struct Sec2Context *, RS_RES_UNMAP_FROM_PARAMS *); 74 void (*__sec2ctxControl_Epilogue__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 75 NV_STATUS (*__sec2ctxControlLookup__)(struct Sec2Context *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **); 76 NV_STATUS (*__sec2ctxGetSwMethods__)(struct Sec2Context *, const METHOD **, NvU32 *); 77 NvHandle (*__sec2ctxGetInternalObjectHandle__)(struct Sec2Context *); 78 NV_STATUS (*__sec2ctxControl__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 79 NV_STATUS (*__sec2ctxUnmap__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RsCpuMapping *); 80 NV_STATUS (*__sec2ctxGetMemInterMapParams__)(struct Sec2Context *, RMRES_MEM_INTER_MAP_PARAMS *); 81 NV_STATUS (*__sec2ctxGetMemoryMappingDescriptor__)(struct Sec2Context *, struct MEMORY_DESCRIPTOR **); 82 NvBool (*__sec2ctxIsSwMethodStalling__)(struct Sec2Context *, NvU32); 83 NV_STATUS (*__sec2ctxControlFilter__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 84 NV_STATUS (*__sec2ctxUnregisterEvent__)(struct Sec2Context *, NvHandle, NvHandle, NvHandle, NvHandle); 85 NV_STATUS (*__sec2ctxControlSerialization_Prologue__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 86 NvBool (*__sec2ctxCanCopy__)(struct Sec2Context *); 87 void (*__sec2ctxPreDestruct__)(struct Sec2Context *); 88 NV_STATUS (*__sec2ctxIsDuplicate__)(struct Sec2Context *, NvHandle, NvBool *); 89 void (*__sec2ctxControlSerialization_Epilogue__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 90 PEVENTNOTIFICATION *(*__sec2ctxGetNotificationListPtr__)(struct Sec2Context *); 91 struct NotifShare *(*__sec2ctxGetNotificationShare__)(struct Sec2Context *); 92 NV_STATUS (*__sec2ctxMap__)(struct Sec2Context *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 93 NV_STATUS (*__sec2ctxGetOrAllocNotifShare__)(struct Sec2Context *, NvHandle, NvHandle, struct NotifShare **); 94 }; 95 96 #ifndef __NVOC_CLASS_Sec2Context_TYPEDEF__ 97 #define __NVOC_CLASS_Sec2Context_TYPEDEF__ 98 typedef struct Sec2Context Sec2Context; 99 #endif /* __NVOC_CLASS_Sec2Context_TYPEDEF__ */ 100 101 #ifndef __nvoc_class_id_Sec2Context 102 #define __nvoc_class_id_Sec2Context 0x4c3439 103 #endif /* __nvoc_class_id_Sec2Context */ 104 105 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Sec2Context; 106 107 #define __staticCast_Sec2Context(pThis) \ 108 ((pThis)->__nvoc_pbase_Sec2Context) 109 110 #ifdef __nvoc_sec2_context_h_disabled 111 #define __dynamicCast_Sec2Context(pThis) ((Sec2Context*)NULL) 112 #else //__nvoc_sec2_context_h_disabled 113 #define __dynamicCast_Sec2Context(pThis) \ 114 ((Sec2Context*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(Sec2Context))) 115 #endif //__nvoc_sec2_context_h_disabled 116 117 118 NV_STATUS __nvoc_objCreateDynamic_Sec2Context(Sec2Context**, Dynamic*, NvU32, va_list); 119 120 NV_STATUS __nvoc_objCreate_Sec2Context(Sec2Context**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 121 #define __objCreate_Sec2Context(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 122 __nvoc_objCreate_Sec2Context((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 123 124 #define sec2ctxCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) sec2ctxCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided) 125 #define sec2ctxShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) sec2ctxShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 126 #define sec2ctxAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) sec2ctxAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 127 #define sec2ctxMapTo(pResource, pParams) sec2ctxMapTo_DISPATCH(pResource, pParams) 128 #define sec2ctxGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) sec2ctxGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace) 129 #define sec2ctxSetNotificationShare(pNotifier, pNotifShare) sec2ctxSetNotificationShare_DISPATCH(pNotifier, pNotifShare) 130 #define sec2ctxGetRefCount(pResource) sec2ctxGetRefCount_DISPATCH(pResource) 131 #define sec2ctxAddAdditionalDependants(pClient, pResource, pReference) sec2ctxAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 132 #define sec2ctxControl_Prologue(pResource, pCallContext, pParams) sec2ctxControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 133 #define sec2ctxGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) sec2ctxGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize) 134 #define sec2ctxInternalControlForward(pGpuResource, command, pParams, size) sec2ctxInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 135 #define sec2ctxUnmapFrom(pResource, pParams) sec2ctxUnmapFrom_DISPATCH(pResource, pParams) 136 #define sec2ctxControl_Epilogue(pResource, pCallContext, pParams) sec2ctxControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 137 #define sec2ctxControlLookup(pResource, pParams, ppEntry) sec2ctxControlLookup_DISPATCH(pResource, pParams, ppEntry) 138 #define sec2ctxGetSwMethods(pChannelDescendant, ppMethods, pNumMethods) sec2ctxGetSwMethods_DISPATCH(pChannelDescendant, ppMethods, pNumMethods) 139 #define sec2ctxGetInternalObjectHandle(pGpuResource) sec2ctxGetInternalObjectHandle_DISPATCH(pGpuResource) 140 #define sec2ctxControl(pGpuResource, pCallContext, pParams) sec2ctxControl_DISPATCH(pGpuResource, pCallContext, pParams) 141 #define sec2ctxUnmap(pGpuResource, pCallContext, pCpuMapping) sec2ctxUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping) 142 #define sec2ctxGetMemInterMapParams(pRmResource, pParams) sec2ctxGetMemInterMapParams_DISPATCH(pRmResource, pParams) 143 #define sec2ctxGetMemoryMappingDescriptor(pRmResource, ppMemDesc) sec2ctxGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 144 #define sec2ctxIsSwMethodStalling(pChannelDescendant, hHandle) sec2ctxIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle) 145 #define sec2ctxControlFilter(pResource, pCallContext, pParams) sec2ctxControlFilter_DISPATCH(pResource, pCallContext, pParams) 146 #define sec2ctxUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) sec2ctxUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) 147 #define sec2ctxControlSerialization_Prologue(pResource, pCallContext, pParams) sec2ctxControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 148 #define sec2ctxCanCopy(pResource) sec2ctxCanCopy_DISPATCH(pResource) 149 #define sec2ctxPreDestruct(pResource) sec2ctxPreDestruct_DISPATCH(pResource) 150 #define sec2ctxIsDuplicate(pResource, hMemory, pDuplicate) sec2ctxIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 151 #define sec2ctxControlSerialization_Epilogue(pResource, pCallContext, pParams) sec2ctxControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 152 #define sec2ctxGetNotificationListPtr(pNotifier) sec2ctxGetNotificationListPtr_DISPATCH(pNotifier) 153 #define sec2ctxGetNotificationShare(pNotifier) sec2ctxGetNotificationShare_DISPATCH(pNotifier) 154 #define sec2ctxMap(pGpuResource, pCallContext, pParams, pCpuMapping) sec2ctxMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping) 155 #define sec2ctxGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) sec2ctxGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) 156 NV_STATUS sec2ctxConstructHal_KERNEL(struct Sec2Context *pSec2Context, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams); 157 158 159 #ifdef __nvoc_sec2_context_h_disabled 160 static inline NV_STATUS sec2ctxConstructHal(struct Sec2Context *pSec2Context, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) { 161 NV_ASSERT_FAILED_PRECOMP("Sec2Context was disabled!"); 162 return NV_ERR_NOT_SUPPORTED; 163 } 164 #else //__nvoc_sec2_context_h_disabled 165 #define sec2ctxConstructHal(pSec2Context, pCallContext, pParams) sec2ctxConstructHal_KERNEL(pSec2Context, pCallContext, pParams) 166 #endif //__nvoc_sec2_context_h_disabled 167 168 #define sec2ctxConstructHal_HAL(pSec2Context, pCallContext, pParams) sec2ctxConstructHal(pSec2Context, pCallContext, pParams) 169 170 void sec2ctxDestructHal_KERNEL(struct Sec2Context *pSec2Context); 171 172 173 #ifdef __nvoc_sec2_context_h_disabled 174 static inline void sec2ctxDestructHal(struct Sec2Context *pSec2Context) { 175 NV_ASSERT_FAILED_PRECOMP("Sec2Context was disabled!"); 176 } 177 #else //__nvoc_sec2_context_h_disabled 178 #define sec2ctxDestructHal(pSec2Context) sec2ctxDestructHal_KERNEL(pSec2Context) 179 #endif //__nvoc_sec2_context_h_disabled 180 181 #define sec2ctxDestructHal_HAL(pSec2Context) sec2ctxDestructHal(pSec2Context) 182 183 static inline NV_STATUS sec2ctxCheckMemInterUnmap_DISPATCH(struct Sec2Context *pChannelDescendant, NvBool bSubdeviceHandleProvided) { 184 return pChannelDescendant->__sec2ctxCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided); 185 } 186 187 static inline NvBool sec2ctxShareCallback_DISPATCH(struct Sec2Context *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 188 return pGpuResource->__sec2ctxShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 189 } 190 191 static inline NvBool sec2ctxAccessCallback_DISPATCH(struct Sec2Context *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 192 return pResource->__sec2ctxAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 193 } 194 195 static inline NV_STATUS sec2ctxMapTo_DISPATCH(struct Sec2Context *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 196 return pResource->__sec2ctxMapTo__(pResource, pParams); 197 } 198 199 static inline NV_STATUS sec2ctxGetMapAddrSpace_DISPATCH(struct Sec2Context *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 200 return pGpuResource->__sec2ctxGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace); 201 } 202 203 static inline void sec2ctxSetNotificationShare_DISPATCH(struct Sec2Context *pNotifier, struct NotifShare *pNotifShare) { 204 pNotifier->__sec2ctxSetNotificationShare__(pNotifier, pNotifShare); 205 } 206 207 static inline NvU32 sec2ctxGetRefCount_DISPATCH(struct Sec2Context *pResource) { 208 return pResource->__sec2ctxGetRefCount__(pResource); 209 } 210 211 static inline void sec2ctxAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct Sec2Context *pResource, RsResourceRef *pReference) { 212 pResource->__sec2ctxAddAdditionalDependants__(pClient, pResource, pReference); 213 } 214 215 static inline NV_STATUS sec2ctxControl_Prologue_DISPATCH(struct Sec2Context *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 216 return pResource->__sec2ctxControl_Prologue__(pResource, pCallContext, pParams); 217 } 218 219 static inline NV_STATUS sec2ctxGetRegBaseOffsetAndSize_DISPATCH(struct Sec2Context *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 220 return pGpuResource->__sec2ctxGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize); 221 } 222 223 static inline NV_STATUS sec2ctxInternalControlForward_DISPATCH(struct Sec2Context *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 224 return pGpuResource->__sec2ctxInternalControlForward__(pGpuResource, command, pParams, size); 225 } 226 227 static inline NV_STATUS sec2ctxUnmapFrom_DISPATCH(struct Sec2Context *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 228 return pResource->__sec2ctxUnmapFrom__(pResource, pParams); 229 } 230 231 static inline void sec2ctxControl_Epilogue_DISPATCH(struct Sec2Context *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 232 pResource->__sec2ctxControl_Epilogue__(pResource, pCallContext, pParams); 233 } 234 235 static inline NV_STATUS sec2ctxControlLookup_DISPATCH(struct Sec2Context *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 236 return pResource->__sec2ctxControlLookup__(pResource, pParams, ppEntry); 237 } 238 239 static inline NV_STATUS sec2ctxGetSwMethods_DISPATCH(struct Sec2Context *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods) { 240 return pChannelDescendant->__sec2ctxGetSwMethods__(pChannelDescendant, ppMethods, pNumMethods); 241 } 242 243 static inline NvHandle sec2ctxGetInternalObjectHandle_DISPATCH(struct Sec2Context *pGpuResource) { 244 return pGpuResource->__sec2ctxGetInternalObjectHandle__(pGpuResource); 245 } 246 247 static inline NV_STATUS sec2ctxControl_DISPATCH(struct Sec2Context *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 248 return pGpuResource->__sec2ctxControl__(pGpuResource, pCallContext, pParams); 249 } 250 251 static inline NV_STATUS sec2ctxUnmap_DISPATCH(struct Sec2Context *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 252 return pGpuResource->__sec2ctxUnmap__(pGpuResource, pCallContext, pCpuMapping); 253 } 254 255 static inline NV_STATUS sec2ctxGetMemInterMapParams_DISPATCH(struct Sec2Context *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 256 return pRmResource->__sec2ctxGetMemInterMapParams__(pRmResource, pParams); 257 } 258 259 static inline NV_STATUS sec2ctxGetMemoryMappingDescriptor_DISPATCH(struct Sec2Context *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 260 return pRmResource->__sec2ctxGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 261 } 262 263 static inline NvBool sec2ctxIsSwMethodStalling_DISPATCH(struct Sec2Context *pChannelDescendant, NvU32 hHandle) { 264 return pChannelDescendant->__sec2ctxIsSwMethodStalling__(pChannelDescendant, hHandle); 265 } 266 267 static inline NV_STATUS sec2ctxControlFilter_DISPATCH(struct Sec2Context *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 268 return pResource->__sec2ctxControlFilter__(pResource, pCallContext, pParams); 269 } 270 271 static inline NV_STATUS sec2ctxUnregisterEvent_DISPATCH(struct Sec2Context *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 272 return pNotifier->__sec2ctxUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent); 273 } 274 275 static inline NV_STATUS sec2ctxControlSerialization_Prologue_DISPATCH(struct Sec2Context *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 276 return pResource->__sec2ctxControlSerialization_Prologue__(pResource, pCallContext, pParams); 277 } 278 279 static inline NvBool sec2ctxCanCopy_DISPATCH(struct Sec2Context *pResource) { 280 return pResource->__sec2ctxCanCopy__(pResource); 281 } 282 283 static inline void sec2ctxPreDestruct_DISPATCH(struct Sec2Context *pResource) { 284 pResource->__sec2ctxPreDestruct__(pResource); 285 } 286 287 static inline NV_STATUS sec2ctxIsDuplicate_DISPATCH(struct Sec2Context *pResource, NvHandle hMemory, NvBool *pDuplicate) { 288 return pResource->__sec2ctxIsDuplicate__(pResource, hMemory, pDuplicate); 289 } 290 291 static inline void sec2ctxControlSerialization_Epilogue_DISPATCH(struct Sec2Context *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 292 pResource->__sec2ctxControlSerialization_Epilogue__(pResource, pCallContext, pParams); 293 } 294 295 static inline PEVENTNOTIFICATION *sec2ctxGetNotificationListPtr_DISPATCH(struct Sec2Context *pNotifier) { 296 return pNotifier->__sec2ctxGetNotificationListPtr__(pNotifier); 297 } 298 299 static inline struct NotifShare *sec2ctxGetNotificationShare_DISPATCH(struct Sec2Context *pNotifier) { 300 return pNotifier->__sec2ctxGetNotificationShare__(pNotifier); 301 } 302 303 static inline NV_STATUS sec2ctxMap_DISPATCH(struct Sec2Context *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 304 return pGpuResource->__sec2ctxMap__(pGpuResource, pCallContext, pParams, pCpuMapping); 305 } 306 307 static inline NV_STATUS sec2ctxGetOrAllocNotifShare_DISPATCH(struct Sec2Context *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 308 return pNotifier->__sec2ctxGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare); 309 } 310 311 static inline NV_STATUS __nvoc_sec2ctxConstruct(struct Sec2Context *arg_pSec2Context, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams) { 312 return sec2ctxConstructHal(arg_pSec2Context, arg_pCallContext, arg_pParams); 313 } 314 315 static inline void __nvoc_sec2ctxDestruct(struct Sec2Context *pSec2Context) { 316 sec2ctxDestructHal(pSec2Context); 317 } 318 319 #undef PRIVATE_FIELD 320 321 322 #endif // SEC2_CONTEXT_H 323 324 #ifdef __cplusplus 325 } // extern "C" 326 #endif 327 #endif // _G_SEC2_CONTEXT_NVOC_H_ 328