1 #define NVOC_SW_TEST_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_sw_test_nvoc.h"
9 
10 #ifdef DEBUG
11 char __nvoc_class_id_uniqueness_check_0xdea092 = 1;
12 #endif
13 
14 extern const struct NVOC_CLASS_DEF __nvoc_class_def_SoftwareMethodTest;
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 extern const struct NVOC_CLASS_DEF __nvoc_class_def_ChannelDescendant;
31 
32 void __nvoc_init_SoftwareMethodTest(SoftwareMethodTest*, RmHalspecOwner* );
33 void __nvoc_init_funcTable_SoftwareMethodTest(SoftwareMethodTest*);
34 NV_STATUS __nvoc_ctor_SoftwareMethodTest(SoftwareMethodTest*, RmHalspecOwner* , struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
35 void __nvoc_init_dataField_SoftwareMethodTest(SoftwareMethodTest*);
36 void __nvoc_dtor_SoftwareMethodTest(SoftwareMethodTest*);
37 extern const struct NVOC_EXPORT_INFO __nvoc_export_info_SoftwareMethodTest;
38 
39 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_SoftwareMethodTest = {
40     /*pClassDef=*/          &__nvoc_class_def_SoftwareMethodTest,
41     /*dtor=*/               (NVOC_DYNAMIC_DTOR) &__nvoc_dtor_SoftwareMethodTest,
42     /*offset=*/             0,
43 };
44 
45 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_Object = {
46     /*pClassDef=*/          &__nvoc_class_def_Object,
47     /*dtor=*/               &__nvoc_destructFromBase,
48     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object),
49 };
50 
51 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_RsResource = {
52     /*pClassDef=*/          &__nvoc_class_def_RsResource,
53     /*dtor=*/               &__nvoc_destructFromBase,
54     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource),
55 };
56 
57 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_RmResourceCommon = {
58     /*pClassDef=*/          &__nvoc_class_def_RmResourceCommon,
59     /*dtor=*/               &__nvoc_destructFromBase,
60     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon),
61 };
62 
63 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_RmResource = {
64     /*pClassDef=*/          &__nvoc_class_def_RmResource,
65     /*dtor=*/               &__nvoc_destructFromBase,
66     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource),
67 };
68 
69 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_GpuResource = {
70     /*pClassDef=*/          &__nvoc_class_def_GpuResource,
71     /*dtor=*/               &__nvoc_destructFromBase,
72     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource),
73 };
74 
75 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_INotifier = {
76     /*pClassDef=*/          &__nvoc_class_def_INotifier,
77     /*dtor=*/               &__nvoc_destructFromBase,
78     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_Notifier.__nvoc_base_INotifier),
79 };
80 
81 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_Notifier = {
82     /*pClassDef=*/          &__nvoc_class_def_Notifier,
83     /*dtor=*/               &__nvoc_destructFromBase,
84     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant.__nvoc_base_Notifier),
85 };
86 
87 static const struct NVOC_RTTI __nvoc_rtti_SoftwareMethodTest_ChannelDescendant = {
88     /*pClassDef=*/          &__nvoc_class_def_ChannelDescendant,
89     /*dtor=*/               &__nvoc_destructFromBase,
90     /*offset=*/             NV_OFFSETOF(SoftwareMethodTest, __nvoc_base_ChannelDescendant),
91 };
92 
93 static const struct NVOC_CASTINFO __nvoc_castinfo_SoftwareMethodTest = {
94     /*numRelatives=*/       9,
95     /*relatives=*/ {
96         &__nvoc_rtti_SoftwareMethodTest_SoftwareMethodTest,
97         &__nvoc_rtti_SoftwareMethodTest_ChannelDescendant,
98         &__nvoc_rtti_SoftwareMethodTest_Notifier,
99         &__nvoc_rtti_SoftwareMethodTest_INotifier,
100         &__nvoc_rtti_SoftwareMethodTest_GpuResource,
101         &__nvoc_rtti_SoftwareMethodTest_RmResource,
102         &__nvoc_rtti_SoftwareMethodTest_RmResourceCommon,
103         &__nvoc_rtti_SoftwareMethodTest_RsResource,
104         &__nvoc_rtti_SoftwareMethodTest_Object,
105     },
106 };
107 
108 const struct NVOC_CLASS_DEF __nvoc_class_def_SoftwareMethodTest =
109 {
110     /*classInfo=*/ {
111         /*size=*/               sizeof(SoftwareMethodTest),
112         /*classId=*/            classId(SoftwareMethodTest),
113         /*providerId=*/         &__nvoc_rtti_provider,
114 #if NV_PRINTF_STRINGS_ALLOWED
115         /*name=*/               "SoftwareMethodTest",
116 #endif
117     },
118     /*objCreatefn=*/        (NVOC_DYNAMIC_OBJ_CREATE) &__nvoc_objCreateDynamic_SoftwareMethodTest,
119     /*pCastInfo=*/          &__nvoc_castinfo_SoftwareMethodTest,
120     /*pExportInfo=*/        &__nvoc_export_info_SoftwareMethodTest
121 };
122 
__nvoc_thunk_SoftwareMethodTest_chandesGetSwMethods(struct ChannelDescendant * pSwTest,const METHOD ** ppMethods,NvU32 * pNumMethods)123 static NV_STATUS __nvoc_thunk_SoftwareMethodTest_chandesGetSwMethods(struct ChannelDescendant *pSwTest, const METHOD **ppMethods, NvU32 *pNumMethods) {
124     return swtestGetSwMethods((struct SoftwareMethodTest *)(((unsigned char *)pSwTest) - __nvoc_rtti_SoftwareMethodTest_ChannelDescendant.offset), ppMethods, pNumMethods);
125 }
126 
__nvoc_thunk_ChannelDescendant_swtestCheckMemInterUnmap(struct SoftwareMethodTest * pChannelDescendant,NvBool bSubdeviceHandleProvided)127 static NV_STATUS __nvoc_thunk_ChannelDescendant_swtestCheckMemInterUnmap(struct SoftwareMethodTest *pChannelDescendant, NvBool bSubdeviceHandleProvided) {
128     return chandesCheckMemInterUnmap((struct ChannelDescendant *)(((unsigned char *)pChannelDescendant) + __nvoc_rtti_SoftwareMethodTest_ChannelDescendant.offset), bSubdeviceHandleProvided);
129 }
130 
__nvoc_thunk_GpuResource_swtestShareCallback(struct SoftwareMethodTest * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)131 static NvBool __nvoc_thunk_GpuResource_swtestShareCallback(struct SoftwareMethodTest *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
132     return gpuresShareCallback((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pInvokingClient, pParentRef, pSharePolicy);
133 }
134 
__nvoc_thunk_RmResource_swtestAccessCallback(struct SoftwareMethodTest * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)135 static NvBool __nvoc_thunk_RmResource_swtestAccessCallback(struct SoftwareMethodTest *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
136     return rmresAccessCallback((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pInvokingClient, pAllocParams, accessRight);
137 }
138 
__nvoc_thunk_RsResource_swtestMapTo(struct SoftwareMethodTest * pResource,RS_RES_MAP_TO_PARAMS * pParams)139 static NV_STATUS __nvoc_thunk_RsResource_swtestMapTo(struct SoftwareMethodTest *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
140     return resMapTo((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset), pParams);
141 }
142 
__nvoc_thunk_GpuResource_swtestGetMapAddrSpace(struct SoftwareMethodTest * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)143 static NV_STATUS __nvoc_thunk_GpuResource_swtestGetMapAddrSpace(struct SoftwareMethodTest *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
144     return gpuresGetMapAddrSpace((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pCallContext, mapFlags, pAddrSpace);
145 }
146 
__nvoc_thunk_Notifier_swtestSetNotificationShare(struct SoftwareMethodTest * pNotifier,struct NotifShare * pNotifShare)147 static void __nvoc_thunk_Notifier_swtestSetNotificationShare(struct SoftwareMethodTest *pNotifier, struct NotifShare *pNotifShare) {
148     notifySetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_SoftwareMethodTest_Notifier.offset), pNotifShare);
149 }
150 
__nvoc_thunk_RsResource_swtestGetRefCount(struct SoftwareMethodTest * pResource)151 static NvU32 __nvoc_thunk_RsResource_swtestGetRefCount(struct SoftwareMethodTest *pResource) {
152     return resGetRefCount((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset));
153 }
154 
__nvoc_thunk_RsResource_swtestAddAdditionalDependants(struct RsClient * pClient,struct SoftwareMethodTest * pResource,RsResourceRef * pReference)155 static void __nvoc_thunk_RsResource_swtestAddAdditionalDependants(struct RsClient *pClient, struct SoftwareMethodTest *pResource, RsResourceRef *pReference) {
156     resAddAdditionalDependants(pClient, (struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset), pReference);
157 }
158 
__nvoc_thunk_RmResource_swtestControl_Prologue(struct SoftwareMethodTest * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)159 static NV_STATUS __nvoc_thunk_RmResource_swtestControl_Prologue(struct SoftwareMethodTest *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
160     return rmresControl_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pCallContext, pParams);
161 }
162 
__nvoc_thunk_GpuResource_swtestGetRegBaseOffsetAndSize(struct SoftwareMethodTest * pGpuResource,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)163 static NV_STATUS __nvoc_thunk_GpuResource_swtestGetRegBaseOffsetAndSize(struct SoftwareMethodTest *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
164     return gpuresGetRegBaseOffsetAndSize((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pGpu, pOffset, pSize);
165 }
166 
__nvoc_thunk_GpuResource_swtestInternalControlForward(struct SoftwareMethodTest * pGpuResource,NvU32 command,void * pParams,NvU32 size)167 static NV_STATUS __nvoc_thunk_GpuResource_swtestInternalControlForward(struct SoftwareMethodTest *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
168     return gpuresInternalControlForward((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), command, pParams, size);
169 }
170 
__nvoc_thunk_RsResource_swtestUnmapFrom(struct SoftwareMethodTest * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)171 static NV_STATUS __nvoc_thunk_RsResource_swtestUnmapFrom(struct SoftwareMethodTest *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
172     return resUnmapFrom((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset), pParams);
173 }
174 
__nvoc_thunk_RmResource_swtestControl_Epilogue(struct SoftwareMethodTest * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)175 static void __nvoc_thunk_RmResource_swtestControl_Epilogue(struct SoftwareMethodTest *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
176     rmresControl_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pCallContext, pParams);
177 }
178 
__nvoc_thunk_GpuResource_swtestGetInternalObjectHandle(struct SoftwareMethodTest * pGpuResource)179 static NvHandle __nvoc_thunk_GpuResource_swtestGetInternalObjectHandle(struct SoftwareMethodTest *pGpuResource) {
180     return gpuresGetInternalObjectHandle((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset));
181 }
182 
__nvoc_thunk_GpuResource_swtestControl(struct SoftwareMethodTest * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)183 static NV_STATUS __nvoc_thunk_GpuResource_swtestControl(struct SoftwareMethodTest *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
184     return gpuresControl((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pCallContext, pParams);
185 }
186 
__nvoc_thunk_GpuResource_swtestUnmap(struct SoftwareMethodTest * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)187 static NV_STATUS __nvoc_thunk_GpuResource_swtestUnmap(struct SoftwareMethodTest *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
188     return gpuresUnmap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pCallContext, pCpuMapping);
189 }
190 
__nvoc_thunk_RmResource_swtestGetMemInterMapParams(struct SoftwareMethodTest * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)191 static NV_STATUS __nvoc_thunk_RmResource_swtestGetMemInterMapParams(struct SoftwareMethodTest *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
192     return rmresGetMemInterMapParams((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pParams);
193 }
194 
__nvoc_thunk_RmResource_swtestGetMemoryMappingDescriptor(struct SoftwareMethodTest * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)195 static NV_STATUS __nvoc_thunk_RmResource_swtestGetMemoryMappingDescriptor(struct SoftwareMethodTest *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
196     return rmresGetMemoryMappingDescriptor((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), ppMemDesc);
197 }
198 
__nvoc_thunk_ChannelDescendant_swtestIsSwMethodStalling(struct SoftwareMethodTest * pChannelDescendant,NvU32 hHandle)199 static NvBool __nvoc_thunk_ChannelDescendant_swtestIsSwMethodStalling(struct SoftwareMethodTest *pChannelDescendant, NvU32 hHandle) {
200     return chandesIsSwMethodStalling((struct ChannelDescendant *)(((unsigned char *)pChannelDescendant) + __nvoc_rtti_SoftwareMethodTest_ChannelDescendant.offset), hHandle);
201 }
202 
__nvoc_thunk_RsResource_swtestControlFilter(struct SoftwareMethodTest * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)203 static NV_STATUS __nvoc_thunk_RsResource_swtestControlFilter(struct SoftwareMethodTest *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
204     return resControlFilter((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset), pCallContext, pParams);
205 }
206 
__nvoc_thunk_Notifier_swtestUnregisterEvent(struct SoftwareMethodTest * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,NvHandle hEventClient,NvHandle hEvent)207 static NV_STATUS __nvoc_thunk_Notifier_swtestUnregisterEvent(struct SoftwareMethodTest *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
208     return notifyUnregisterEvent((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_SoftwareMethodTest_Notifier.offset), hNotifierClient, hNotifierResource, hEventClient, hEvent);
209 }
210 
__nvoc_thunk_RmResource_swtestControlSerialization_Prologue(struct SoftwareMethodTest * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)211 static NV_STATUS __nvoc_thunk_RmResource_swtestControlSerialization_Prologue(struct SoftwareMethodTest *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
212     return rmresControlSerialization_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pCallContext, pParams);
213 }
214 
__nvoc_thunk_RsResource_swtestCanCopy(struct SoftwareMethodTest * pResource)215 static NvBool __nvoc_thunk_RsResource_swtestCanCopy(struct SoftwareMethodTest *pResource) {
216     return resCanCopy((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset));
217 }
218 
__nvoc_thunk_RsResource_swtestIsPartialUnmapSupported(struct SoftwareMethodTest * pResource)219 static NvBool __nvoc_thunk_RsResource_swtestIsPartialUnmapSupported(struct SoftwareMethodTest *pResource) {
220     return resIsPartialUnmapSupported((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset));
221 }
222 
__nvoc_thunk_RsResource_swtestPreDestruct(struct SoftwareMethodTest * pResource)223 static void __nvoc_thunk_RsResource_swtestPreDestruct(struct SoftwareMethodTest *pResource) {
224     resPreDestruct((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset));
225 }
226 
__nvoc_thunk_RsResource_swtestIsDuplicate(struct SoftwareMethodTest * pResource,NvHandle hMemory,NvBool * pDuplicate)227 static NV_STATUS __nvoc_thunk_RsResource_swtestIsDuplicate(struct SoftwareMethodTest *pResource, NvHandle hMemory, NvBool *pDuplicate) {
228     return resIsDuplicate((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RsResource.offset), hMemory, pDuplicate);
229 }
230 
__nvoc_thunk_RmResource_swtestControlSerialization_Epilogue(struct SoftwareMethodTest * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)231 static void __nvoc_thunk_RmResource_swtestControlSerialization_Epilogue(struct SoftwareMethodTest *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
232     rmresControlSerialization_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SoftwareMethodTest_RmResource.offset), pCallContext, pParams);
233 }
234 
__nvoc_thunk_Notifier_swtestGetNotificationListPtr(struct SoftwareMethodTest * pNotifier)235 static PEVENTNOTIFICATION *__nvoc_thunk_Notifier_swtestGetNotificationListPtr(struct SoftwareMethodTest *pNotifier) {
236     return notifyGetNotificationListPtr((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_SoftwareMethodTest_Notifier.offset));
237 }
238 
__nvoc_thunk_Notifier_swtestGetNotificationShare(struct SoftwareMethodTest * pNotifier)239 static struct NotifShare *__nvoc_thunk_Notifier_swtestGetNotificationShare(struct SoftwareMethodTest *pNotifier) {
240     return notifyGetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_SoftwareMethodTest_Notifier.offset));
241 }
242 
__nvoc_thunk_GpuResource_swtestMap(struct SoftwareMethodTest * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)243 static NV_STATUS __nvoc_thunk_GpuResource_swtestMap(struct SoftwareMethodTest *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
244     return gpuresMap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SoftwareMethodTest_GpuResource.offset), pCallContext, pParams, pCpuMapping);
245 }
246 
__nvoc_thunk_Notifier_swtestGetOrAllocNotifShare(struct SoftwareMethodTest * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,struct NotifShare ** ppNotifShare)247 static NV_STATUS __nvoc_thunk_Notifier_swtestGetOrAllocNotifShare(struct SoftwareMethodTest *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
248     return notifyGetOrAllocNotifShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_SoftwareMethodTest_Notifier.offset), hNotifierClient, hNotifierResource, ppNotifShare);
249 }
250 
251 const struct NVOC_EXPORT_INFO __nvoc_export_info_SoftwareMethodTest =
252 {
253     /*numEntries=*/     0,
254     /*pExportEntries=*/  0
255 };
256 
257 void __nvoc_dtor_ChannelDescendant(ChannelDescendant*);
__nvoc_dtor_SoftwareMethodTest(SoftwareMethodTest * pThis)258 void __nvoc_dtor_SoftwareMethodTest(SoftwareMethodTest *pThis) {
259     __nvoc_swtestDestruct(pThis);
260     __nvoc_dtor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant);
261     PORT_UNREFERENCED_VARIABLE(pThis);
262 }
263 
__nvoc_init_dataField_SoftwareMethodTest(SoftwareMethodTest * pThis)264 void __nvoc_init_dataField_SoftwareMethodTest(SoftwareMethodTest *pThis) {
265     PORT_UNREFERENCED_VARIABLE(pThis);
266 }
267 
268 NV_STATUS __nvoc_ctor_ChannelDescendant(ChannelDescendant* , RmHalspecOwner* , struct CALL_CONTEXT *, struct RS_RES_ALLOC_PARAMS_INTERNAL *, PARAM_TO_ENGDESC_FUNCTION *);
__nvoc_ctor_SoftwareMethodTest(SoftwareMethodTest * pThis,RmHalspecOwner * pRmhalspecowner,struct CALL_CONTEXT * arg_pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)269 NV_STATUS __nvoc_ctor_SoftwareMethodTest(SoftwareMethodTest *pThis, RmHalspecOwner *pRmhalspecowner, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) {
270     NV_STATUS status = NV_OK;
271     status = __nvoc_ctor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant, pRmhalspecowner, arg_pCallContext, arg_pParams, ((void *)0));
272     if (status != NV_OK) goto __nvoc_ctor_SoftwareMethodTest_fail_ChannelDescendant;
273     __nvoc_init_dataField_SoftwareMethodTest(pThis);
274 
275     status = __nvoc_swtestConstruct(pThis, arg_pCallContext, arg_pParams);
276     if (status != NV_OK) goto __nvoc_ctor_SoftwareMethodTest_fail__init;
277     goto __nvoc_ctor_SoftwareMethodTest_exit; // Success
278 
279 __nvoc_ctor_SoftwareMethodTest_fail__init:
280     __nvoc_dtor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant);
281 __nvoc_ctor_SoftwareMethodTest_fail_ChannelDescendant:
282 __nvoc_ctor_SoftwareMethodTest_exit:
283 
284     return status;
285 }
286 
__nvoc_init_funcTable_SoftwareMethodTest_1(SoftwareMethodTest * pThis)287 static void __nvoc_init_funcTable_SoftwareMethodTest_1(SoftwareMethodTest *pThis) {
288     PORT_UNREFERENCED_VARIABLE(pThis);
289 
290     pThis->__swtestGetSwMethods__ = &swtestGetSwMethods_IMPL;
291 
292     pThis->__nvoc_base_ChannelDescendant.__chandesGetSwMethods__ = &__nvoc_thunk_SoftwareMethodTest_chandesGetSwMethods;
293 
294     pThis->__swtestCheckMemInterUnmap__ = &__nvoc_thunk_ChannelDescendant_swtestCheckMemInterUnmap;
295 
296     pThis->__swtestShareCallback__ = &__nvoc_thunk_GpuResource_swtestShareCallback;
297 
298     pThis->__swtestAccessCallback__ = &__nvoc_thunk_RmResource_swtestAccessCallback;
299 
300     pThis->__swtestMapTo__ = &__nvoc_thunk_RsResource_swtestMapTo;
301 
302     pThis->__swtestGetMapAddrSpace__ = &__nvoc_thunk_GpuResource_swtestGetMapAddrSpace;
303 
304     pThis->__swtestSetNotificationShare__ = &__nvoc_thunk_Notifier_swtestSetNotificationShare;
305 
306     pThis->__swtestGetRefCount__ = &__nvoc_thunk_RsResource_swtestGetRefCount;
307 
308     pThis->__swtestAddAdditionalDependants__ = &__nvoc_thunk_RsResource_swtestAddAdditionalDependants;
309 
310     pThis->__swtestControl_Prologue__ = &__nvoc_thunk_RmResource_swtestControl_Prologue;
311 
312     pThis->__swtestGetRegBaseOffsetAndSize__ = &__nvoc_thunk_GpuResource_swtestGetRegBaseOffsetAndSize;
313 
314     pThis->__swtestInternalControlForward__ = &__nvoc_thunk_GpuResource_swtestInternalControlForward;
315 
316     pThis->__swtestUnmapFrom__ = &__nvoc_thunk_RsResource_swtestUnmapFrom;
317 
318     pThis->__swtestControl_Epilogue__ = &__nvoc_thunk_RmResource_swtestControl_Epilogue;
319 
320     pThis->__swtestGetInternalObjectHandle__ = &__nvoc_thunk_GpuResource_swtestGetInternalObjectHandle;
321 
322     pThis->__swtestControl__ = &__nvoc_thunk_GpuResource_swtestControl;
323 
324     pThis->__swtestUnmap__ = &__nvoc_thunk_GpuResource_swtestUnmap;
325 
326     pThis->__swtestGetMemInterMapParams__ = &__nvoc_thunk_RmResource_swtestGetMemInterMapParams;
327 
328     pThis->__swtestGetMemoryMappingDescriptor__ = &__nvoc_thunk_RmResource_swtestGetMemoryMappingDescriptor;
329 
330     pThis->__swtestIsSwMethodStalling__ = &__nvoc_thunk_ChannelDescendant_swtestIsSwMethodStalling;
331 
332     pThis->__swtestControlFilter__ = &__nvoc_thunk_RsResource_swtestControlFilter;
333 
334     pThis->__swtestUnregisterEvent__ = &__nvoc_thunk_Notifier_swtestUnregisterEvent;
335 
336     pThis->__swtestControlSerialization_Prologue__ = &__nvoc_thunk_RmResource_swtestControlSerialization_Prologue;
337 
338     pThis->__swtestCanCopy__ = &__nvoc_thunk_RsResource_swtestCanCopy;
339 
340     pThis->__swtestIsPartialUnmapSupported__ = &__nvoc_thunk_RsResource_swtestIsPartialUnmapSupported;
341 
342     pThis->__swtestPreDestruct__ = &__nvoc_thunk_RsResource_swtestPreDestruct;
343 
344     pThis->__swtestIsDuplicate__ = &__nvoc_thunk_RsResource_swtestIsDuplicate;
345 
346     pThis->__swtestControlSerialization_Epilogue__ = &__nvoc_thunk_RmResource_swtestControlSerialization_Epilogue;
347 
348     pThis->__swtestGetNotificationListPtr__ = &__nvoc_thunk_Notifier_swtestGetNotificationListPtr;
349 
350     pThis->__swtestGetNotificationShare__ = &__nvoc_thunk_Notifier_swtestGetNotificationShare;
351 
352     pThis->__swtestMap__ = &__nvoc_thunk_GpuResource_swtestMap;
353 
354     pThis->__swtestGetOrAllocNotifShare__ = &__nvoc_thunk_Notifier_swtestGetOrAllocNotifShare;
355 }
356 
__nvoc_init_funcTable_SoftwareMethodTest(SoftwareMethodTest * pThis)357 void __nvoc_init_funcTable_SoftwareMethodTest(SoftwareMethodTest *pThis) {
358     __nvoc_init_funcTable_SoftwareMethodTest_1(pThis);
359 }
360 
361 void __nvoc_init_ChannelDescendant(ChannelDescendant*, RmHalspecOwner* );
__nvoc_init_SoftwareMethodTest(SoftwareMethodTest * pThis,RmHalspecOwner * pRmhalspecowner)362 void __nvoc_init_SoftwareMethodTest(SoftwareMethodTest *pThis, RmHalspecOwner *pRmhalspecowner) {
363     pThis->__nvoc_pbase_SoftwareMethodTest = pThis;
364     pThis->__nvoc_pbase_Object = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object;
365     pThis->__nvoc_pbase_RsResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource;
366     pThis->__nvoc_pbase_RmResourceCommon = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon;
367     pThis->__nvoc_pbase_RmResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource;
368     pThis->__nvoc_pbase_GpuResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource;
369     pThis->__nvoc_pbase_INotifier = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_Notifier.__nvoc_base_INotifier;
370     pThis->__nvoc_pbase_Notifier = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_Notifier;
371     pThis->__nvoc_pbase_ChannelDescendant = &pThis->__nvoc_base_ChannelDescendant;
372     __nvoc_init_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant, pRmhalspecowner);
373     __nvoc_init_funcTable_SoftwareMethodTest(pThis);
374 }
375 
__nvoc_objCreate_SoftwareMethodTest(SoftwareMethodTest ** ppThis,Dynamic * pParent,NvU32 createFlags,struct CALL_CONTEXT * arg_pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)376 NV_STATUS __nvoc_objCreate_SoftwareMethodTest(SoftwareMethodTest **ppThis, Dynamic *pParent, NvU32 createFlags, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)
377 {
378     NV_STATUS status;
379     Object *pParentObj = NULL;
380     SoftwareMethodTest *pThis;
381     RmHalspecOwner *pRmhalspecowner;
382 
383     // Assign `pThis`, allocating memory unless suppressed by flag.
384     status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(SoftwareMethodTest), (void**)&pThis, (void**)ppThis);
385     if (status != NV_OK)
386         return status;
387 
388     // Zero is the initial value for everything.
389     portMemSet(pThis, 0, sizeof(SoftwareMethodTest));
390 
391     // Initialize runtime type information.
392     __nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_SoftwareMethodTest);
393 
394     pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.createFlags = createFlags;
395 
396     // pParent must be a valid object that derives from a halspec owner class.
397     NV_ASSERT_OR_RETURN(pParent != NULL, NV_ERR_INVALID_ARGUMENT);
398 
399     // Link the child into the parent unless flagged not to do so.
400     if (!(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY))
401     {
402         pParentObj = dynamicCast(pParent, Object);
403         objAddChild(pParentObj, &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
404     }
405     else
406     {
407         pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.pParent = NULL;
408     }
409 
410     if ((pRmhalspecowner = dynamicCast(pParent, RmHalspecOwner)) == NULL)
411         pRmhalspecowner = objFindAncestorOfType(RmHalspecOwner, pParent);
412     NV_ASSERT_OR_RETURN(pRmhalspecowner != NULL, NV_ERR_INVALID_ARGUMENT);
413 
414     __nvoc_init_SoftwareMethodTest(pThis, pRmhalspecowner);
415     status = __nvoc_ctor_SoftwareMethodTest(pThis, pRmhalspecowner, arg_pCallContext, arg_pParams);
416     if (status != NV_OK) goto __nvoc_objCreate_SoftwareMethodTest_cleanup;
417 
418     // Assignment has no effect if NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT is set.
419     *ppThis = pThis;
420 
421     return NV_OK;
422 
423 __nvoc_objCreate_SoftwareMethodTest_cleanup:
424 
425     // Unlink the child from the parent if it was linked above.
426     if (pParentObj != NULL)
427         objRemoveChild(pParentObj, &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
428 
429     // Do not call destructors here since the constructor already called them.
430     if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT)
431         portMemSet(pThis, 0, sizeof(SoftwareMethodTest));
432     else
433     {
434         portMemFree(pThis);
435         *ppThis = NULL;
436     }
437 
438     // coverity[leaked_storage:FALSE]
439     return status;
440 }
441 
__nvoc_objCreateDynamic_SoftwareMethodTest(SoftwareMethodTest ** ppThis,Dynamic * pParent,NvU32 createFlags,va_list args)442 NV_STATUS __nvoc_objCreateDynamic_SoftwareMethodTest(SoftwareMethodTest **ppThis, Dynamic *pParent, NvU32 createFlags, va_list args) {
443     NV_STATUS status;
444     struct CALL_CONTEXT * arg_pCallContext = va_arg(args, struct CALL_CONTEXT *);
445     struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams = va_arg(args, struct RS_RES_ALLOC_PARAMS_INTERNAL *);
446 
447     status = __nvoc_objCreate_SoftwareMethodTest(ppThis, pParent, createFlags, arg_pCallContext, arg_pParams);
448 
449     return status;
450 }
451 
452