1 #ifndef _G_EGM_MEM_NVOC_H_
2 #define _G_EGM_MEM_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_egm_mem_nvoc.h"
33 
34 #ifndef _EGM_MEMORY_H_
35 #define _EGM_MEMORY_H_
36 
37 #include "mem_mgr/video_mem.h"
38 #include "mem_mgr/system_mem.h"
39 
40 
41 /*!
42  * Allocator for Extended GPU Memory (EGM)
43  * EGM is CPU_MEM accessed like peer GPU_MEM
44  */
45 
46 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
47 // the matching C source file, but causes diagnostics to be issued if another
48 // source file references the field.
49 #ifdef NVOC_EGM_MEM_H_PRIVATE_ACCESS_ALLOWED
50 #define PRIVATE_FIELD(x) x
51 #else
52 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
53 #endif
54 
55 struct ExtendedGpuMemory {
56     const struct NVOC_RTTI *__nvoc_rtti;
57     struct StandardMemory __nvoc_base_StandardMemory;
58     struct Object *__nvoc_pbase_Object;
59     struct RsResource *__nvoc_pbase_RsResource;
60     struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
61     struct RmResource *__nvoc_pbase_RmResource;
62     struct Memory *__nvoc_pbase_Memory;
63     struct StandardMemory *__nvoc_pbase_StandardMemory;
64     struct ExtendedGpuMemory *__nvoc_pbase_ExtendedGpuMemory;
65     NV_STATUS (*__egmmemCheckMemInterUnmap__)(struct ExtendedGpuMemory *, NvBool);
66     NvBool (*__egmmemShareCallback__)(struct ExtendedGpuMemory *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
67     NV_STATUS (*__egmmemMapTo__)(struct ExtendedGpuMemory *, RS_RES_MAP_TO_PARAMS *);
68     NV_STATUS (*__egmmemGetMapAddrSpace__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
69     NvBool (*__egmmemIsExportAllowed__)(struct ExtendedGpuMemory *);
70     NvU32 (*__egmmemGetRefCount__)(struct ExtendedGpuMemory *);
71     void (*__egmmemAddAdditionalDependants__)(struct RsClient *, struct ExtendedGpuMemory *, RsResourceRef *);
72     NV_STATUS (*__egmmemControl_Prologue__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
73     NvBool (*__egmmemIsGpuMapAllowed__)(struct ExtendedGpuMemory *, struct OBJGPU *);
74     NV_STATUS (*__egmmemUnmapFrom__)(struct ExtendedGpuMemory *, RS_RES_UNMAP_FROM_PARAMS *);
75     void (*__egmmemControl_Epilogue__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
76     NV_STATUS (*__egmmemControl__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
77     NV_STATUS (*__egmmemUnmap__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, RsCpuMapping *);
78     NV_STATUS (*__egmmemGetMemInterMapParams__)(struct ExtendedGpuMemory *, RMRES_MEM_INTER_MAP_PARAMS *);
79     NV_STATUS (*__egmmemGetMemoryMappingDescriptor__)(struct ExtendedGpuMemory *, MEMORY_DESCRIPTOR **);
80     NV_STATUS (*__egmmemControlFilter__)(struct ExtendedGpuMemory *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
81     NV_STATUS (*__egmmemControlSerialization_Prologue__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
82     NvBool (*__egmmemCanCopy__)(struct ExtendedGpuMemory *);
83     NvBool (*__egmmemIsPartialUnmapSupported__)(struct ExtendedGpuMemory *);
84     NV_STATUS (*__egmmemIsReady__)(struct ExtendedGpuMemory *, NvBool);
85     NV_STATUS (*__egmmemCheckCopyPermissions__)(struct ExtendedGpuMemory *, struct OBJGPU *, struct Device *);
86     void (*__egmmemPreDestruct__)(struct ExtendedGpuMemory *);
87     NV_STATUS (*__egmmemIsDuplicate__)(struct ExtendedGpuMemory *, NvHandle, NvBool *);
88     void (*__egmmemControlSerialization_Epilogue__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
89     NV_STATUS (*__egmmemMap__)(struct ExtendedGpuMemory *, CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, RsCpuMapping *);
90     NvBool (*__egmmemAccessCallback__)(struct ExtendedGpuMemory *, struct RsClient *, void *, RsAccessRight);
91 };
92 
93 #ifndef __NVOC_CLASS_ExtendedGpuMemory_TYPEDEF__
94 #define __NVOC_CLASS_ExtendedGpuMemory_TYPEDEF__
95 typedef struct ExtendedGpuMemory ExtendedGpuMemory;
96 #endif /* __NVOC_CLASS_ExtendedGpuMemory_TYPEDEF__ */
97 
98 #ifndef __nvoc_class_id_ExtendedGpuMemory
99 #define __nvoc_class_id_ExtendedGpuMemory 0xeffa5c
100 #endif /* __nvoc_class_id_ExtendedGpuMemory */
101 
102 extern const struct NVOC_CLASS_DEF __nvoc_class_def_ExtendedGpuMemory;
103 
104 #define __staticCast_ExtendedGpuMemory(pThis) \
105     ((pThis)->__nvoc_pbase_ExtendedGpuMemory)
106 
107 #ifdef __nvoc_egm_mem_h_disabled
108 #define __dynamicCast_ExtendedGpuMemory(pThis) ((ExtendedGpuMemory*)NULL)
109 #else //__nvoc_egm_mem_h_disabled
110 #define __dynamicCast_ExtendedGpuMemory(pThis) \
111     ((ExtendedGpuMemory*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(ExtendedGpuMemory)))
112 #endif //__nvoc_egm_mem_h_disabled
113 
114 
115 NV_STATUS __nvoc_objCreateDynamic_ExtendedGpuMemory(ExtendedGpuMemory**, Dynamic*, NvU32, va_list);
116 
117 NV_STATUS __nvoc_objCreate_ExtendedGpuMemory(ExtendedGpuMemory**, Dynamic*, NvU32, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
118 #define __objCreate_ExtendedGpuMemory(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
119     __nvoc_objCreate_ExtendedGpuMemory((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
120 
121 #define egmmemCheckMemInterUnmap(pMemory, bSubdeviceHandleProvided) egmmemCheckMemInterUnmap_DISPATCH(pMemory, bSubdeviceHandleProvided)
122 #define egmmemShareCallback(pResource, pInvokingClient, pParentRef, pSharePolicy) egmmemShareCallback_DISPATCH(pResource, pInvokingClient, pParentRef, pSharePolicy)
123 #define egmmemMapTo(pResource, pParams) egmmemMapTo_DISPATCH(pResource, pParams)
124 #define egmmemGetMapAddrSpace(pMemory, pCallContext, mapFlags, pAddrSpace) egmmemGetMapAddrSpace_DISPATCH(pMemory, pCallContext, mapFlags, pAddrSpace)
125 #define egmmemIsExportAllowed(pMemory) egmmemIsExportAllowed_DISPATCH(pMemory)
126 #define egmmemGetRefCount(pResource) egmmemGetRefCount_DISPATCH(pResource)
127 #define egmmemAddAdditionalDependants(pClient, pResource, pReference) egmmemAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
128 #define egmmemControl_Prologue(pResource, pCallContext, pParams) egmmemControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
129 #define egmmemIsGpuMapAllowed(pMemory, pGpu) egmmemIsGpuMapAllowed_DISPATCH(pMemory, pGpu)
130 #define egmmemUnmapFrom(pResource, pParams) egmmemUnmapFrom_DISPATCH(pResource, pParams)
131 #define egmmemControl_Epilogue(pResource, pCallContext, pParams) egmmemControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
132 #define egmmemControl(pMemory, pCallContext, pParams) egmmemControl_DISPATCH(pMemory, pCallContext, pParams)
133 #define egmmemUnmap(pMemory, pCallContext, pCpuMapping) egmmemUnmap_DISPATCH(pMemory, pCallContext, pCpuMapping)
134 #define egmmemGetMemInterMapParams(pMemory, pParams) egmmemGetMemInterMapParams_DISPATCH(pMemory, pParams)
135 #define egmmemGetMemoryMappingDescriptor(pMemory, ppMemDesc) egmmemGetMemoryMappingDescriptor_DISPATCH(pMemory, ppMemDesc)
136 #define egmmemControlFilter(pResource, pCallContext, pParams) egmmemControlFilter_DISPATCH(pResource, pCallContext, pParams)
137 #define egmmemControlSerialization_Prologue(pResource, pCallContext, pParams) egmmemControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
138 #define egmmemCanCopy(pStandardMemory) egmmemCanCopy_DISPATCH(pStandardMemory)
139 #define egmmemIsPartialUnmapSupported(pResource) egmmemIsPartialUnmapSupported_DISPATCH(pResource)
140 #define egmmemIsReady(pMemory, bCopyConstructorContext) egmmemIsReady_DISPATCH(pMemory, bCopyConstructorContext)
141 #define egmmemCheckCopyPermissions(pMemory, pDstGpu, pDstDevice) egmmemCheckCopyPermissions_DISPATCH(pMemory, pDstGpu, pDstDevice)
142 #define egmmemPreDestruct(pResource) egmmemPreDestruct_DISPATCH(pResource)
143 #define egmmemIsDuplicate(pMemory, hMemory, pDuplicate) egmmemIsDuplicate_DISPATCH(pMemory, hMemory, pDuplicate)
144 #define egmmemControlSerialization_Epilogue(pResource, pCallContext, pParams) egmmemControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
145 #define egmmemMap(pMemory, pCallContext, pParams, pCpuMapping) egmmemMap_DISPATCH(pMemory, pCallContext, pParams, pCpuMapping)
146 #define egmmemAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) egmmemAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
egmmemCheckMemInterUnmap_DISPATCH(struct ExtendedGpuMemory * pMemory,NvBool bSubdeviceHandleProvided)147 static inline NV_STATUS egmmemCheckMemInterUnmap_DISPATCH(struct ExtendedGpuMemory *pMemory, NvBool bSubdeviceHandleProvided) {
148     return pMemory->__egmmemCheckMemInterUnmap__(pMemory, bSubdeviceHandleProvided);
149 }
150 
egmmemShareCallback_DISPATCH(struct ExtendedGpuMemory * pResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)151 static inline NvBool egmmemShareCallback_DISPATCH(struct ExtendedGpuMemory *pResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
152     return pResource->__egmmemShareCallback__(pResource, pInvokingClient, pParentRef, pSharePolicy);
153 }
154 
egmmemMapTo_DISPATCH(struct ExtendedGpuMemory * pResource,RS_RES_MAP_TO_PARAMS * pParams)155 static inline NV_STATUS egmmemMapTo_DISPATCH(struct ExtendedGpuMemory *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
156     return pResource->__egmmemMapTo__(pResource, pParams);
157 }
158 
egmmemGetMapAddrSpace_DISPATCH(struct ExtendedGpuMemory * pMemory,CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)159 static inline NV_STATUS egmmemGetMapAddrSpace_DISPATCH(struct ExtendedGpuMemory *pMemory, CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
160     return pMemory->__egmmemGetMapAddrSpace__(pMemory, pCallContext, mapFlags, pAddrSpace);
161 }
162 
egmmemIsExportAllowed_DISPATCH(struct ExtendedGpuMemory * pMemory)163 static inline NvBool egmmemIsExportAllowed_DISPATCH(struct ExtendedGpuMemory *pMemory) {
164     return pMemory->__egmmemIsExportAllowed__(pMemory);
165 }
166 
egmmemGetRefCount_DISPATCH(struct ExtendedGpuMemory * pResource)167 static inline NvU32 egmmemGetRefCount_DISPATCH(struct ExtendedGpuMemory *pResource) {
168     return pResource->__egmmemGetRefCount__(pResource);
169 }
170 
egmmemAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct ExtendedGpuMemory * pResource,RsResourceRef * pReference)171 static inline void egmmemAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct ExtendedGpuMemory *pResource, RsResourceRef *pReference) {
172     pResource->__egmmemAddAdditionalDependants__(pClient, pResource, pReference);
173 }
174 
egmmemControl_Prologue_DISPATCH(struct ExtendedGpuMemory * pResource,CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)175 static inline NV_STATUS egmmemControl_Prologue_DISPATCH(struct ExtendedGpuMemory *pResource, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
176     return pResource->__egmmemControl_Prologue__(pResource, pCallContext, pParams);
177 }
178 
egmmemIsGpuMapAllowed_DISPATCH(struct ExtendedGpuMemory * pMemory,struct OBJGPU * pGpu)179 static inline NvBool egmmemIsGpuMapAllowed_DISPATCH(struct ExtendedGpuMemory *pMemory, struct OBJGPU *pGpu) {
180     return pMemory->__egmmemIsGpuMapAllowed__(pMemory, pGpu);
181 }
182 
egmmemUnmapFrom_DISPATCH(struct ExtendedGpuMemory * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)183 static inline NV_STATUS egmmemUnmapFrom_DISPATCH(struct ExtendedGpuMemory *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
184     return pResource->__egmmemUnmapFrom__(pResource, pParams);
185 }
186 
egmmemControl_Epilogue_DISPATCH(struct ExtendedGpuMemory * pResource,CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)187 static inline void egmmemControl_Epilogue_DISPATCH(struct ExtendedGpuMemory *pResource, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
188     pResource->__egmmemControl_Epilogue__(pResource, pCallContext, pParams);
189 }
190 
egmmemControl_DISPATCH(struct ExtendedGpuMemory * pMemory,CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)191 static inline NV_STATUS egmmemControl_DISPATCH(struct ExtendedGpuMemory *pMemory, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
192     return pMemory->__egmmemControl__(pMemory, pCallContext, pParams);
193 }
194 
egmmemUnmap_DISPATCH(struct ExtendedGpuMemory * pMemory,CALL_CONTEXT * pCallContext,RsCpuMapping * pCpuMapping)195 static inline NV_STATUS egmmemUnmap_DISPATCH(struct ExtendedGpuMemory *pMemory, CALL_CONTEXT *pCallContext, RsCpuMapping *pCpuMapping) {
196     return pMemory->__egmmemUnmap__(pMemory, pCallContext, pCpuMapping);
197 }
198 
egmmemGetMemInterMapParams_DISPATCH(struct ExtendedGpuMemory * pMemory,RMRES_MEM_INTER_MAP_PARAMS * pParams)199 static inline NV_STATUS egmmemGetMemInterMapParams_DISPATCH(struct ExtendedGpuMemory *pMemory, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
200     return pMemory->__egmmemGetMemInterMapParams__(pMemory, pParams);
201 }
202 
egmmemGetMemoryMappingDescriptor_DISPATCH(struct ExtendedGpuMemory * pMemory,MEMORY_DESCRIPTOR ** ppMemDesc)203 static inline NV_STATUS egmmemGetMemoryMappingDescriptor_DISPATCH(struct ExtendedGpuMemory *pMemory, MEMORY_DESCRIPTOR **ppMemDesc) {
204     return pMemory->__egmmemGetMemoryMappingDescriptor__(pMemory, ppMemDesc);
205 }
206 
egmmemControlFilter_DISPATCH(struct ExtendedGpuMemory * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)207 static inline NV_STATUS egmmemControlFilter_DISPATCH(struct ExtendedGpuMemory *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
208     return pResource->__egmmemControlFilter__(pResource, pCallContext, pParams);
209 }
210 
egmmemControlSerialization_Prologue_DISPATCH(struct ExtendedGpuMemory * pResource,CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)211 static inline NV_STATUS egmmemControlSerialization_Prologue_DISPATCH(struct ExtendedGpuMemory *pResource, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
212     return pResource->__egmmemControlSerialization_Prologue__(pResource, pCallContext, pParams);
213 }
214 
egmmemCanCopy_DISPATCH(struct ExtendedGpuMemory * pStandardMemory)215 static inline NvBool egmmemCanCopy_DISPATCH(struct ExtendedGpuMemory *pStandardMemory) {
216     return pStandardMemory->__egmmemCanCopy__(pStandardMemory);
217 }
218 
egmmemIsPartialUnmapSupported_DISPATCH(struct ExtendedGpuMemory * pResource)219 static inline NvBool egmmemIsPartialUnmapSupported_DISPATCH(struct ExtendedGpuMemory *pResource) {
220     return pResource->__egmmemIsPartialUnmapSupported__(pResource);
221 }
222 
egmmemIsReady_DISPATCH(struct ExtendedGpuMemory * pMemory,NvBool bCopyConstructorContext)223 static inline NV_STATUS egmmemIsReady_DISPATCH(struct ExtendedGpuMemory *pMemory, NvBool bCopyConstructorContext) {
224     return pMemory->__egmmemIsReady__(pMemory, bCopyConstructorContext);
225 }
226 
egmmemCheckCopyPermissions_DISPATCH(struct ExtendedGpuMemory * pMemory,struct OBJGPU * pDstGpu,struct Device * pDstDevice)227 static inline NV_STATUS egmmemCheckCopyPermissions_DISPATCH(struct ExtendedGpuMemory *pMemory, struct OBJGPU *pDstGpu, struct Device *pDstDevice) {
228     return pMemory->__egmmemCheckCopyPermissions__(pMemory, pDstGpu, pDstDevice);
229 }
230 
egmmemPreDestruct_DISPATCH(struct ExtendedGpuMemory * pResource)231 static inline void egmmemPreDestruct_DISPATCH(struct ExtendedGpuMemory *pResource) {
232     pResource->__egmmemPreDestruct__(pResource);
233 }
234 
egmmemIsDuplicate_DISPATCH(struct ExtendedGpuMemory * pMemory,NvHandle hMemory,NvBool * pDuplicate)235 static inline NV_STATUS egmmemIsDuplicate_DISPATCH(struct ExtendedGpuMemory *pMemory, NvHandle hMemory, NvBool *pDuplicate) {
236     return pMemory->__egmmemIsDuplicate__(pMemory, hMemory, pDuplicate);
237 }
238 
egmmemControlSerialization_Epilogue_DISPATCH(struct ExtendedGpuMemory * pResource,CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)239 static inline void egmmemControlSerialization_Epilogue_DISPATCH(struct ExtendedGpuMemory *pResource, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
240     pResource->__egmmemControlSerialization_Epilogue__(pResource, pCallContext, pParams);
241 }
242 
egmmemMap_DISPATCH(struct ExtendedGpuMemory * pMemory,CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,RsCpuMapping * pCpuMapping)243 static inline NV_STATUS egmmemMap_DISPATCH(struct ExtendedGpuMemory *pMemory, CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, RsCpuMapping *pCpuMapping) {
244     return pMemory->__egmmemMap__(pMemory, pCallContext, pParams, pCpuMapping);
245 }
246 
egmmemAccessCallback_DISPATCH(struct ExtendedGpuMemory * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)247 static inline NvBool egmmemAccessCallback_DISPATCH(struct ExtendedGpuMemory *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
248     return pResource->__egmmemAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
249 }
250 
251 NV_STATUS egmmemConstruct_IMPL(struct ExtendedGpuMemory *arg_pStandardMemory, CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams);
252 
253 #define __nvoc_egmmemConstruct(arg_pStandardMemory, arg_pCallContext, arg_pParams) egmmemConstruct_IMPL(arg_pStandardMemory, arg_pCallContext, arg_pParams)
254 NV_STATUS egmmemValidateParams_IMPL(struct OBJGPU *pGpu, NvHandle hClient, NV_MEMORY_ALLOCATION_PARAMS *pAllocData);
255 
256 #define egmmemValidateParams(pGpu, hClient, pAllocData) egmmemValidateParams_IMPL(pGpu, hClient, pAllocData)
257 #undef PRIVATE_FIELD
258 
259 
260 NV_STATUS egmmemAllocResources(OBJGPU *pGpu, struct MemoryManager *pMemoryManager,
261                                MEMORY_ALLOCATION_REQUEST *pAllocRequest, FB_ALLOC_INFO *pFbAllocInfo);
262 
263 #endif // _EGM_MEMORY_H_
264 
265 #ifdef __cplusplus
266 } // extern "C"
267 #endif
268 
269 #endif // _G_EGM_MEM_NVOC_H_
270