1 #define NVOC_TMR_H_PRIVATE_ACCESS_ALLOWED
2 #include "nvoc/runtime.h"
3 #include "nvoc/rtti.h"
4 #include "nvtypes.h"
5 #include "nvport/nvport.h"
6 #include "nvport/inline/util_valist.h"
7 #include "utils/nvassert.h"
8 #include "g_tmr_nvoc.h"
9 
10 #ifdef DEBUG
11 char __nvoc_class_id_uniqueness_check_0xb13ac4 = 1;
12 #endif
13 
14 extern const struct NVOC_CLASS_DEF __nvoc_class_def_TimerApi;
15 
16 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Object;
17 
18 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RsResource;
19 
20 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RmResourceCommon;
21 
22 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RmResource;
23 
24 extern const struct NVOC_CLASS_DEF __nvoc_class_def_GpuResource;
25 
26 extern const struct NVOC_CLASS_DEF __nvoc_class_def_INotifier;
27 
28 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Notifier;
29 
30 void __nvoc_init_TimerApi(TimerApi*);
31 void __nvoc_init_funcTable_TimerApi(TimerApi*);
32 NV_STATUS __nvoc_ctor_TimerApi(TimerApi*, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
33 void __nvoc_init_dataField_TimerApi(TimerApi*);
34 void __nvoc_dtor_TimerApi(TimerApi*);
35 extern const struct NVOC_EXPORT_INFO __nvoc_export_info_TimerApi;
36 
37 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_TimerApi = {
38     /*pClassDef=*/          &__nvoc_class_def_TimerApi,
39     /*dtor=*/               (NVOC_DYNAMIC_DTOR) &__nvoc_dtor_TimerApi,
40     /*offset=*/             0,
41 };
42 
43 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_Object = {
44     /*pClassDef=*/          &__nvoc_class_def_Object,
45     /*dtor=*/               &__nvoc_destructFromBase,
46     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object),
47 };
48 
49 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_RsResource = {
50     /*pClassDef=*/          &__nvoc_class_def_RsResource,
51     /*dtor=*/               &__nvoc_destructFromBase,
52     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource),
53 };
54 
55 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_RmResourceCommon = {
56     /*pClassDef=*/          &__nvoc_class_def_RmResourceCommon,
57     /*dtor=*/               &__nvoc_destructFromBase,
58     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon),
59 };
60 
61 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_RmResource = {
62     /*pClassDef=*/          &__nvoc_class_def_RmResource,
63     /*dtor=*/               &__nvoc_destructFromBase,
64     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_GpuResource.__nvoc_base_RmResource),
65 };
66 
67 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_GpuResource = {
68     /*pClassDef=*/          &__nvoc_class_def_GpuResource,
69     /*dtor=*/               &__nvoc_destructFromBase,
70     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_GpuResource),
71 };
72 
73 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_INotifier = {
74     /*pClassDef=*/          &__nvoc_class_def_INotifier,
75     /*dtor=*/               &__nvoc_destructFromBase,
76     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_Notifier.__nvoc_base_INotifier),
77 };
78 
79 static const struct NVOC_RTTI __nvoc_rtti_TimerApi_Notifier = {
80     /*pClassDef=*/          &__nvoc_class_def_Notifier,
81     /*dtor=*/               &__nvoc_destructFromBase,
82     /*offset=*/             NV_OFFSETOF(TimerApi, __nvoc_base_Notifier),
83 };
84 
85 static const struct NVOC_CASTINFO __nvoc_castinfo_TimerApi = {
86     /*numRelatives=*/       8,
87     /*relatives=*/ {
88         &__nvoc_rtti_TimerApi_TimerApi,
89         &__nvoc_rtti_TimerApi_Notifier,
90         &__nvoc_rtti_TimerApi_INotifier,
91         &__nvoc_rtti_TimerApi_GpuResource,
92         &__nvoc_rtti_TimerApi_RmResource,
93         &__nvoc_rtti_TimerApi_RmResourceCommon,
94         &__nvoc_rtti_TimerApi_RsResource,
95         &__nvoc_rtti_TimerApi_Object,
96     },
97 };
98 
99 const struct NVOC_CLASS_DEF __nvoc_class_def_TimerApi =
100 {
101     /*classInfo=*/ {
102         /*size=*/               sizeof(TimerApi),
103         /*classId=*/            classId(TimerApi),
104         /*providerId=*/         &__nvoc_rtti_provider,
105 #if NV_PRINTF_STRINGS_ALLOWED
106         /*name=*/               "TimerApi",
107 #endif
108     },
109     /*objCreatefn=*/        (NVOC_DYNAMIC_OBJ_CREATE) &__nvoc_objCreateDynamic_TimerApi,
110     /*pCastInfo=*/          &__nvoc_castinfo_TimerApi,
111     /*pExportInfo=*/        &__nvoc_export_info_TimerApi
112 };
113 
__nvoc_thunk_TimerApi_gpuresGetRegBaseOffsetAndSize(struct GpuResource * pTimerApi,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)114 static NV_STATUS __nvoc_thunk_TimerApi_gpuresGetRegBaseOffsetAndSize(struct GpuResource *pTimerApi, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
115     return tmrapiGetRegBaseOffsetAndSize((struct TimerApi *)(((unsigned char *)pTimerApi) - __nvoc_rtti_TimerApi_GpuResource.offset), pGpu, pOffset, pSize);
116 }
117 
__nvoc_thunk_GpuResource_tmrapiShareCallback(struct TimerApi * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)118 static NvBool __nvoc_thunk_GpuResource_tmrapiShareCallback(struct TimerApi *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
119     return gpuresShareCallback((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), pInvokingClient, pParentRef, pSharePolicy);
120 }
121 
__nvoc_thunk_RmResource_tmrapiCheckMemInterUnmap(struct TimerApi * pRmResource,NvBool bSubdeviceHandleProvided)122 static NV_STATUS __nvoc_thunk_RmResource_tmrapiCheckMemInterUnmap(struct TimerApi *pRmResource, NvBool bSubdeviceHandleProvided) {
123     return rmresCheckMemInterUnmap((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_TimerApi_RmResource.offset), bSubdeviceHandleProvided);
124 }
125 
__nvoc_thunk_Notifier_tmrapiGetOrAllocNotifShare(struct TimerApi * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,struct NotifShare ** ppNotifShare)126 static NV_STATUS __nvoc_thunk_Notifier_tmrapiGetOrAllocNotifShare(struct TimerApi *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
127     return notifyGetOrAllocNotifShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_TimerApi_Notifier.offset), hNotifierClient, hNotifierResource, ppNotifShare);
128 }
129 
__nvoc_thunk_RsResource_tmrapiMapTo(struct TimerApi * pResource,RS_RES_MAP_TO_PARAMS * pParams)130 static NV_STATUS __nvoc_thunk_RsResource_tmrapiMapTo(struct TimerApi *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
131     return resMapTo((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset), pParams);
132 }
133 
__nvoc_thunk_GpuResource_tmrapiGetMapAddrSpace(struct TimerApi * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)134 static NV_STATUS __nvoc_thunk_GpuResource_tmrapiGetMapAddrSpace(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
135     return gpuresGetMapAddrSpace((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), pCallContext, mapFlags, pAddrSpace);
136 }
137 
__nvoc_thunk_Notifier_tmrapiSetNotificationShare(struct TimerApi * pNotifier,struct NotifShare * pNotifShare)138 static void __nvoc_thunk_Notifier_tmrapiSetNotificationShare(struct TimerApi *pNotifier, struct NotifShare *pNotifShare) {
139     notifySetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_TimerApi_Notifier.offset), pNotifShare);
140 }
141 
__nvoc_thunk_RsResource_tmrapiGetRefCount(struct TimerApi * pResource)142 static NvU32 __nvoc_thunk_RsResource_tmrapiGetRefCount(struct TimerApi *pResource) {
143     return resGetRefCount((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset));
144 }
145 
__nvoc_thunk_RsResource_tmrapiAddAdditionalDependants(struct RsClient * pClient,struct TimerApi * pResource,RsResourceRef * pReference)146 static void __nvoc_thunk_RsResource_tmrapiAddAdditionalDependants(struct RsClient *pClient, struct TimerApi *pResource, RsResourceRef *pReference) {
147     resAddAdditionalDependants(pClient, (struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset), pReference);
148 }
149 
__nvoc_thunk_RmResource_tmrapiControl_Prologue(struct TimerApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)150 static NV_STATUS __nvoc_thunk_RmResource_tmrapiControl_Prologue(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
151     return rmresControl_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RmResource.offset), pCallContext, pParams);
152 }
153 
__nvoc_thunk_GpuResource_tmrapiInternalControlForward(struct TimerApi * pGpuResource,NvU32 command,void * pParams,NvU32 size)154 static NV_STATUS __nvoc_thunk_GpuResource_tmrapiInternalControlForward(struct TimerApi *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
155     return gpuresInternalControlForward((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), command, pParams, size);
156 }
157 
__nvoc_thunk_RsResource_tmrapiUnmapFrom(struct TimerApi * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)158 static NV_STATUS __nvoc_thunk_RsResource_tmrapiUnmapFrom(struct TimerApi *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
159     return resUnmapFrom((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset), pParams);
160 }
161 
__nvoc_thunk_RmResource_tmrapiControl_Epilogue(struct TimerApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)162 static void __nvoc_thunk_RmResource_tmrapiControl_Epilogue(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
163     rmresControl_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RmResource.offset), pCallContext, pParams);
164 }
165 
__nvoc_thunk_GpuResource_tmrapiGetInternalObjectHandle(struct TimerApi * pGpuResource)166 static NvHandle __nvoc_thunk_GpuResource_tmrapiGetInternalObjectHandle(struct TimerApi *pGpuResource) {
167     return gpuresGetInternalObjectHandle((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset));
168 }
169 
__nvoc_thunk_GpuResource_tmrapiControl(struct TimerApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)170 static NV_STATUS __nvoc_thunk_GpuResource_tmrapiControl(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
171     return gpuresControl((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), pCallContext, pParams);
172 }
173 
__nvoc_thunk_GpuResource_tmrapiUnmap(struct TimerApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)174 static NV_STATUS __nvoc_thunk_GpuResource_tmrapiUnmap(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
175     return gpuresUnmap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), pCallContext, pCpuMapping);
176 }
177 
__nvoc_thunk_RmResource_tmrapiGetMemInterMapParams(struct TimerApi * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)178 static NV_STATUS __nvoc_thunk_RmResource_tmrapiGetMemInterMapParams(struct TimerApi *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
179     return rmresGetMemInterMapParams((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_TimerApi_RmResource.offset), pParams);
180 }
181 
__nvoc_thunk_RmResource_tmrapiGetMemoryMappingDescriptor(struct TimerApi * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)182 static NV_STATUS __nvoc_thunk_RmResource_tmrapiGetMemoryMappingDescriptor(struct TimerApi *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
183     return rmresGetMemoryMappingDescriptor((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_TimerApi_RmResource.offset), ppMemDesc);
184 }
185 
__nvoc_thunk_RsResource_tmrapiControlFilter(struct TimerApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)186 static NV_STATUS __nvoc_thunk_RsResource_tmrapiControlFilter(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
187     return resControlFilter((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset), pCallContext, pParams);
188 }
189 
__nvoc_thunk_Notifier_tmrapiUnregisterEvent(struct TimerApi * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,NvHandle hEventClient,NvHandle hEvent)190 static NV_STATUS __nvoc_thunk_Notifier_tmrapiUnregisterEvent(struct TimerApi *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
191     return notifyUnregisterEvent((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_TimerApi_Notifier.offset), hNotifierClient, hNotifierResource, hEventClient, hEvent);
192 }
193 
__nvoc_thunk_RmResource_tmrapiControlSerialization_Prologue(struct TimerApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)194 static NV_STATUS __nvoc_thunk_RmResource_tmrapiControlSerialization_Prologue(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
195     return rmresControlSerialization_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RmResource.offset), pCallContext, pParams);
196 }
197 
__nvoc_thunk_RsResource_tmrapiCanCopy(struct TimerApi * pResource)198 static NvBool __nvoc_thunk_RsResource_tmrapiCanCopy(struct TimerApi *pResource) {
199     return resCanCopy((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset));
200 }
201 
__nvoc_thunk_RsResource_tmrapiIsPartialUnmapSupported(struct TimerApi * pResource)202 static NvBool __nvoc_thunk_RsResource_tmrapiIsPartialUnmapSupported(struct TimerApi *pResource) {
203     return resIsPartialUnmapSupported((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset));
204 }
205 
__nvoc_thunk_RsResource_tmrapiPreDestruct(struct TimerApi * pResource)206 static void __nvoc_thunk_RsResource_tmrapiPreDestruct(struct TimerApi *pResource) {
207     resPreDestruct((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset));
208 }
209 
__nvoc_thunk_RsResource_tmrapiIsDuplicate(struct TimerApi * pResource,NvHandle hMemory,NvBool * pDuplicate)210 static NV_STATUS __nvoc_thunk_RsResource_tmrapiIsDuplicate(struct TimerApi *pResource, NvHandle hMemory, NvBool *pDuplicate) {
211     return resIsDuplicate((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RsResource.offset), hMemory, pDuplicate);
212 }
213 
__nvoc_thunk_RmResource_tmrapiControlSerialization_Epilogue(struct TimerApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)214 static void __nvoc_thunk_RmResource_tmrapiControlSerialization_Epilogue(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
215     rmresControlSerialization_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RmResource.offset), pCallContext, pParams);
216 }
217 
__nvoc_thunk_Notifier_tmrapiGetNotificationListPtr(struct TimerApi * pNotifier)218 static PEVENTNOTIFICATION *__nvoc_thunk_Notifier_tmrapiGetNotificationListPtr(struct TimerApi *pNotifier) {
219     return notifyGetNotificationListPtr((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_TimerApi_Notifier.offset));
220 }
221 
__nvoc_thunk_Notifier_tmrapiGetNotificationShare(struct TimerApi * pNotifier)222 static struct NotifShare *__nvoc_thunk_Notifier_tmrapiGetNotificationShare(struct TimerApi *pNotifier) {
223     return notifyGetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_TimerApi_Notifier.offset));
224 }
225 
__nvoc_thunk_GpuResource_tmrapiMap(struct TimerApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)226 static NV_STATUS __nvoc_thunk_GpuResource_tmrapiMap(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
227     return gpuresMap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_TimerApi_GpuResource.offset), pCallContext, pParams, pCpuMapping);
228 }
229 
__nvoc_thunk_RmResource_tmrapiAccessCallback(struct TimerApi * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)230 static NvBool __nvoc_thunk_RmResource_tmrapiAccessCallback(struct TimerApi *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
231     return rmresAccessCallback((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_TimerApi_RmResource.offset), pInvokingClient, pAllocParams, accessRight);
232 }
233 
234 #if !defined(NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG)
235 #define NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(x)      (0)
236 #endif
237 
238 static const struct NVOC_EXPORTED_METHOD_DEF __nvoc_exported_method_def_TimerApi[] =
239 {
240     {               /*  [0] */
241 #if NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x10u)
242         /*pFunc=*/      (void (*)(void)) NULL,
243 #else
244         /*pFunc=*/      (void (*)(void)) tmrapiCtrlCmdTmrSetAlarmNotify_IMPL,
245 #endif // NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x10u)
246         /*flags=*/      0x10u,
247         /*accessRight=*/0x0u,
248         /*methodId=*/   0x40110u,
249         /*paramSize=*/  sizeof(NV0004_CTRL_TMR_SET_ALARM_NOTIFY_PARAMS),
250         /*pClassInfo=*/ &(__nvoc_class_def_TimerApi.classInfo),
251 #if NV_PRINTF_STRINGS_ALLOWED
252         /*func=*/       "tmrapiCtrlCmdTmrSetAlarmNotify"
253 #endif
254     },
255 
256 };
257 
258 const struct NVOC_EXPORT_INFO __nvoc_export_info_TimerApi =
259 {
260     /*numEntries=*/     1,
261     /*pExportEntries=*/ __nvoc_exported_method_def_TimerApi
262 };
263 
264 void __nvoc_dtor_GpuResource(GpuResource*);
265 void __nvoc_dtor_Notifier(Notifier*);
__nvoc_dtor_TimerApi(TimerApi * pThis)266 void __nvoc_dtor_TimerApi(TimerApi *pThis) {
267     __nvoc_tmrapiDestruct(pThis);
268     __nvoc_dtor_GpuResource(&pThis->__nvoc_base_GpuResource);
269     __nvoc_dtor_Notifier(&pThis->__nvoc_base_Notifier);
270     PORT_UNREFERENCED_VARIABLE(pThis);
271 }
272 
__nvoc_init_dataField_TimerApi(TimerApi * pThis)273 void __nvoc_init_dataField_TimerApi(TimerApi *pThis) {
274     PORT_UNREFERENCED_VARIABLE(pThis);
275 }
276 
277 NV_STATUS __nvoc_ctor_GpuResource(GpuResource* , struct CALL_CONTEXT *, struct RS_RES_ALLOC_PARAMS_INTERNAL *);
278 NV_STATUS __nvoc_ctor_Notifier(Notifier* , struct CALL_CONTEXT *);
__nvoc_ctor_TimerApi(TimerApi * pThis,struct CALL_CONTEXT * arg_pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)279 NV_STATUS __nvoc_ctor_TimerApi(TimerApi *pThis, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) {
280     NV_STATUS status = NV_OK;
281     status = __nvoc_ctor_GpuResource(&pThis->__nvoc_base_GpuResource, arg_pCallContext, arg_pParams);
282     if (status != NV_OK) goto __nvoc_ctor_TimerApi_fail_GpuResource;
283     status = __nvoc_ctor_Notifier(&pThis->__nvoc_base_Notifier, arg_pCallContext);
284     if (status != NV_OK) goto __nvoc_ctor_TimerApi_fail_Notifier;
285     __nvoc_init_dataField_TimerApi(pThis);
286 
287     status = __nvoc_tmrapiConstruct(pThis, arg_pCallContext, arg_pParams);
288     if (status != NV_OK) goto __nvoc_ctor_TimerApi_fail__init;
289     goto __nvoc_ctor_TimerApi_exit; // Success
290 
291 __nvoc_ctor_TimerApi_fail__init:
292     __nvoc_dtor_Notifier(&pThis->__nvoc_base_Notifier);
293 __nvoc_ctor_TimerApi_fail_Notifier:
294     __nvoc_dtor_GpuResource(&pThis->__nvoc_base_GpuResource);
295 __nvoc_ctor_TimerApi_fail_GpuResource:
296 __nvoc_ctor_TimerApi_exit:
297 
298     return status;
299 }
300 
__nvoc_init_funcTable_TimerApi_1(TimerApi * pThis)301 static void __nvoc_init_funcTable_TimerApi_1(TimerApi *pThis) {
302     PORT_UNREFERENCED_VARIABLE(pThis);
303 
304     pThis->__tmrapiGetRegBaseOffsetAndSize__ = &tmrapiGetRegBaseOffsetAndSize_IMPL;
305 
306 #if !NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x10u)
307     pThis->__tmrapiCtrlCmdTmrSetAlarmNotify__ = &tmrapiCtrlCmdTmrSetAlarmNotify_IMPL;
308 #endif
309 
310     pThis->__nvoc_base_GpuResource.__gpuresGetRegBaseOffsetAndSize__ = &__nvoc_thunk_TimerApi_gpuresGetRegBaseOffsetAndSize;
311 
312     pThis->__tmrapiShareCallback__ = &__nvoc_thunk_GpuResource_tmrapiShareCallback;
313 
314     pThis->__tmrapiCheckMemInterUnmap__ = &__nvoc_thunk_RmResource_tmrapiCheckMemInterUnmap;
315 
316     pThis->__tmrapiGetOrAllocNotifShare__ = &__nvoc_thunk_Notifier_tmrapiGetOrAllocNotifShare;
317 
318     pThis->__tmrapiMapTo__ = &__nvoc_thunk_RsResource_tmrapiMapTo;
319 
320     pThis->__tmrapiGetMapAddrSpace__ = &__nvoc_thunk_GpuResource_tmrapiGetMapAddrSpace;
321 
322     pThis->__tmrapiSetNotificationShare__ = &__nvoc_thunk_Notifier_tmrapiSetNotificationShare;
323 
324     pThis->__tmrapiGetRefCount__ = &__nvoc_thunk_RsResource_tmrapiGetRefCount;
325 
326     pThis->__tmrapiAddAdditionalDependants__ = &__nvoc_thunk_RsResource_tmrapiAddAdditionalDependants;
327 
328     pThis->__tmrapiControl_Prologue__ = &__nvoc_thunk_RmResource_tmrapiControl_Prologue;
329 
330     pThis->__tmrapiInternalControlForward__ = &__nvoc_thunk_GpuResource_tmrapiInternalControlForward;
331 
332     pThis->__tmrapiUnmapFrom__ = &__nvoc_thunk_RsResource_tmrapiUnmapFrom;
333 
334     pThis->__tmrapiControl_Epilogue__ = &__nvoc_thunk_RmResource_tmrapiControl_Epilogue;
335 
336     pThis->__tmrapiGetInternalObjectHandle__ = &__nvoc_thunk_GpuResource_tmrapiGetInternalObjectHandle;
337 
338     pThis->__tmrapiControl__ = &__nvoc_thunk_GpuResource_tmrapiControl;
339 
340     pThis->__tmrapiUnmap__ = &__nvoc_thunk_GpuResource_tmrapiUnmap;
341 
342     pThis->__tmrapiGetMemInterMapParams__ = &__nvoc_thunk_RmResource_tmrapiGetMemInterMapParams;
343 
344     pThis->__tmrapiGetMemoryMappingDescriptor__ = &__nvoc_thunk_RmResource_tmrapiGetMemoryMappingDescriptor;
345 
346     pThis->__tmrapiControlFilter__ = &__nvoc_thunk_RsResource_tmrapiControlFilter;
347 
348     pThis->__tmrapiUnregisterEvent__ = &__nvoc_thunk_Notifier_tmrapiUnregisterEvent;
349 
350     pThis->__tmrapiControlSerialization_Prologue__ = &__nvoc_thunk_RmResource_tmrapiControlSerialization_Prologue;
351 
352     pThis->__tmrapiCanCopy__ = &__nvoc_thunk_RsResource_tmrapiCanCopy;
353 
354     pThis->__tmrapiIsPartialUnmapSupported__ = &__nvoc_thunk_RsResource_tmrapiIsPartialUnmapSupported;
355 
356     pThis->__tmrapiPreDestruct__ = &__nvoc_thunk_RsResource_tmrapiPreDestruct;
357 
358     pThis->__tmrapiIsDuplicate__ = &__nvoc_thunk_RsResource_tmrapiIsDuplicate;
359 
360     pThis->__tmrapiControlSerialization_Epilogue__ = &__nvoc_thunk_RmResource_tmrapiControlSerialization_Epilogue;
361 
362     pThis->__tmrapiGetNotificationListPtr__ = &__nvoc_thunk_Notifier_tmrapiGetNotificationListPtr;
363 
364     pThis->__tmrapiGetNotificationShare__ = &__nvoc_thunk_Notifier_tmrapiGetNotificationShare;
365 
366     pThis->__tmrapiMap__ = &__nvoc_thunk_GpuResource_tmrapiMap;
367 
368     pThis->__tmrapiAccessCallback__ = &__nvoc_thunk_RmResource_tmrapiAccessCallback;
369 }
370 
__nvoc_init_funcTable_TimerApi(TimerApi * pThis)371 void __nvoc_init_funcTable_TimerApi(TimerApi *pThis) {
372     __nvoc_init_funcTable_TimerApi_1(pThis);
373 }
374 
375 void __nvoc_init_GpuResource(GpuResource*);
376 void __nvoc_init_Notifier(Notifier*);
__nvoc_init_TimerApi(TimerApi * pThis)377 void __nvoc_init_TimerApi(TimerApi *pThis) {
378     pThis->__nvoc_pbase_TimerApi = pThis;
379     pThis->__nvoc_pbase_Object = &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object;
380     pThis->__nvoc_pbase_RsResource = &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource;
381     pThis->__nvoc_pbase_RmResourceCommon = &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon;
382     pThis->__nvoc_pbase_RmResource = &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource;
383     pThis->__nvoc_pbase_GpuResource = &pThis->__nvoc_base_GpuResource;
384     pThis->__nvoc_pbase_INotifier = &pThis->__nvoc_base_Notifier.__nvoc_base_INotifier;
385     pThis->__nvoc_pbase_Notifier = &pThis->__nvoc_base_Notifier;
386     __nvoc_init_GpuResource(&pThis->__nvoc_base_GpuResource);
387     __nvoc_init_Notifier(&pThis->__nvoc_base_Notifier);
388     __nvoc_init_funcTable_TimerApi(pThis);
389 }
390 
__nvoc_objCreate_TimerApi(TimerApi ** ppThis,Dynamic * pParent,NvU32 createFlags,struct CALL_CONTEXT * arg_pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)391 NV_STATUS __nvoc_objCreate_TimerApi(TimerApi **ppThis, Dynamic *pParent, NvU32 createFlags, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)
392 {
393     NV_STATUS status;
394     Object *pParentObj = NULL;
395     TimerApi *pThis;
396 
397     // Assign `pThis`, allocating memory unless suppressed by flag.
398     status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(TimerApi), (void**)&pThis, (void**)ppThis);
399     if (status != NV_OK)
400         return status;
401 
402     // Zero is the initial value for everything.
403     portMemSet(pThis, 0, sizeof(TimerApi));
404 
405     // Initialize runtime type information.
406     __nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_TimerApi);
407 
408     pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.createFlags = createFlags;
409 
410     // Link the child into the parent if there is one unless flagged not to do so.
411     if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY))
412     {
413         pParentObj = dynamicCast(pParent, Object);
414         objAddChild(pParentObj, &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
415     }
416     else
417     {
418         pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.pParent = NULL;
419     }
420 
421     __nvoc_init_TimerApi(pThis);
422     status = __nvoc_ctor_TimerApi(pThis, arg_pCallContext, arg_pParams);
423     if (status != NV_OK) goto __nvoc_objCreate_TimerApi_cleanup;
424 
425     // Assignment has no effect if NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT is set.
426     *ppThis = pThis;
427 
428     return NV_OK;
429 
430 __nvoc_objCreate_TimerApi_cleanup:
431 
432     // Unlink the child from the parent if it was linked above.
433     if (pParentObj != NULL)
434         objRemoveChild(pParentObj, &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
435 
436     // Do not call destructors here since the constructor already called them.
437     if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT)
438         portMemSet(pThis, 0, sizeof(TimerApi));
439     else
440     {
441         portMemFree(pThis);
442         *ppThis = NULL;
443     }
444 
445     // coverity[leaked_storage:FALSE]
446     return status;
447 }
448 
__nvoc_objCreateDynamic_TimerApi(TimerApi ** ppThis,Dynamic * pParent,NvU32 createFlags,va_list args)449 NV_STATUS __nvoc_objCreateDynamic_TimerApi(TimerApi **ppThis, Dynamic *pParent, NvU32 createFlags, va_list args) {
450     NV_STATUS status;
451     struct CALL_CONTEXT * arg_pCallContext = va_arg(args, struct CALL_CONTEXT *);
452     struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams = va_arg(args, struct RS_RES_ALLOC_PARAMS_INTERNAL *);
453 
454     status = __nvoc_objCreate_TimerApi(ppThis, pParent, createFlags, arg_pCallContext, arg_pParams);
455 
456     return status;
457 }
458 
459