1 #ifndef _G_KERN_MEM_SYS_NVOC_H_
2 #define _G_KERN_MEM_SYS_NVOC_H_
3 #include "nvoc/runtime.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /*
10  * SPDX-FileCopyrightText: Copyright (c) 1993-2024 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_kern_mem_sys_nvoc.h"
33 
34 #ifndef KERN_MEM_SYS_H
35 #define KERN_MEM_SYS_H
36 
37 #include "core/core.h"
38 #include "gpu/eng_state.h"
39 #include "gpu/gpu.h"
40 #include "containers/map.h"
41 #include "gpu/mem_mgr/heap_base.h"
42 #include "kernel/gpu/mig_mgr/kernel_mig_manager.h"
43 #include "ctrl/ctrl2080/ctrl2080fb.h"
44 #include "ctrl/ctrl2080/ctrl2080internal.h"
45 #include "ctrl/ctrl2080/ctrl2080fb.h"
46 //
47 // FB Cache (opcode, mem target) defines used by kmemsysCacheOp hal API
48 //
49 typedef enum
50 {
51     FB_CACHE_OP_UNDEFINED = 0,
52     // invalidate cache lines without writeback of dirty lines to memory
53     FB_CACHE_INVALIDATE = 1,
54     // writeback dirty lines but leave the lines in valid cache state
55     FB_CACHE_WRITEBACK,
56     // writeback dirty lines and then invalidates the cache state
57     FB_CACHE_EVICT,
58 } FB_CACHE_OP;
59 
60 // target memory types for cache operations
61 typedef enum
62 {
63     FB_CACHE_MEM_UNDEFINED = 0,
64     FB_CACHE_SYSTEM_MEMORY = 1,
65     FB_CACHE_VIDEO_MEMORY,
66     FB_CACHE_PEER_MEMORY,
67     FB_CACHE_DIRTY,
68     FB_CACHE_COMPTAG_MEMORY,
69     FB_CACHE_DIRTY_ALL,
70 } FB_CACHE_MEMTYPE;
71 
72 typedef enum
73 {
74     FB_CACHE_STATE_ENABLED,
75     FB_CACHE_STATE_DISABLED,
76 } FB_CACHE_STATE;
77 
78 typedef enum
79 {
80     FB_CACHE_WRITE_MODE_WRITETHROUGH,
81     FB_CACHE_WRITE_MODE_WRITEBACK,
82 } FB_CACHE_WRITE_MODE;
83 
84 typedef enum
85 {
86     FB_CACHE_BYPASS_MODE_ENABLED,
87     FB_CACHE_BYPASS_MODE_DISABLED,
88 } FB_CACHE_BYPASS_MODE; // FERMI (TEST) ONLY
89 
90 typedef enum
91 {
92     FB_CACHE_RCM_STATE_FULL,
93     FB_CACHE_RCM_STATE_TRANSITIONING,
94     FB_CACHE_RCM_STATE_REDUCED,
95     FB_CACHE_RCM_STATE_ZERO_CACHE,
96 } FB_CACHE_RCM_STATE;
97 
98 /*! Tracks NUMA information of GPU memory partitions */
99 typedef struct
100 {
101     NvBool bInUse;     // Is the partition in use?
102     NvU64  offset;     // FB offset of the partition
103     NvU64  size;       // FB size of the partition
104     NvU32  numaNodeId; // OS NUMA Node Id of the partition.
105 } MEM_PARTITION_NUMA_INFO;
106 
107 typedef struct MIG_MEM_BOUNDARY_CONFIG_TABLE
108 {
109     /*!
110      * Memory boundary config A (4KB aligned)
111      */
112     NvU64 memBoundaryCfgA;
113 
114     /*!
115      * Memory boundary config B (4KB aligned)
116      */
117     NvU64 memBoundaryCfgB;
118 
119     /*!
120      * Memory boundary config C (64KB aligned)
121      */
122     NvU32 memBoundaryCfgC;
123 } MIG_MEM_BOUNDARY_CONFIG_TABLE;
124 
125 /*!
126  * @brief Structure carrying memory configuration information for specific GPU instance
127  *        The information will be used to allocate memory when a GPU instance is
128  *        created or queried. The structure will be indexed with swizzIDs
129  */
130 typedef struct MIG_GPU_INSTANCE_MEMORY_CONFIG
131 {
132     /*!
133      * First VMMU segment from where the GPU instance memory starts
134      */
135     NvU64 startingVmmuSegment;
136 
137     /*!
138      * Size of the GPU instance memory in the form of number of vmmu segments
139      */
140     NvU64 memSizeInVmmuSegment;
141 
142     /*!
143      * GPU Instance memory config initialization state
144      */
145     NvBool bInitialized;
146 } MIG_GPU_INSTANCE_MEMORY_CONFIG;
147 
148 /* @ref NV2080_CTRL_INTERNAL_MEMSYS_GET_STATIC_CONFIG_PARAMS */
149 typedef NV2080_CTRL_INTERNAL_MEMSYS_GET_STATIC_CONFIG_PARAMS MEMORY_SYSTEM_STATIC_CONFIG;
150 
151 #define FB_HWRESID_CTAGID_FERMI              15:0
152 #define FB_HWRESID_ZCULL_FERMI               30:16
153 
154 #define FB_HWRESID_ZCULL_SHIFT_FERMI(i)      (1 << (i))
155 
156 #define FB_HWRESID_CTAGID_VAL_FERMI(n)        \
157     (((n) >> DRF_SHIFT(FB_HWRESID_CTAGID_FERMI)) & DRF_MASK(FB_HWRESID_CTAGID_FERMI))
158 
159 #define FB_HWRESID_CTAGID_NUM_FERMI(i)        \
160    (((i) & DRF_MASK(FB_HWRESID_CTAGID_FERMI)) << DRF_SHIFT(FB_HWRESID_CTAGID_FERMI))
161 
162 #define FB_SET_HWRESID_CTAGID_FERMI(h, i)                                                      \
163     h = ( ((h) & ~(DRF_MASK(FB_HWRESID_CTAGID_FERMI) << DRF_SHIFT(FB_HWRESID_CTAGID_FERMI))) | \
164       FB_HWRESID_CTAGID_NUM_FERMI(i) )
165 
166 #define FB_HWRESID_ZCULL_NUM_FERMI(i)        \
167    (((1<<i) & DRF_MASK(FB_HWRESID_ZCULL_FERMI)) << DRF_SHIFT(FB_HWRESID_ZCULL_FERMI))
168 
169 #define FB_HWRESID_ZCULL_VAL_FERMI(n)        \
170     (((n) >> DRF_SHIFT(FB_HWRESID_ZCULL_FERMI)) & DRF_MASK(FB_HWRESID_ZCULL_FERMI))
171 
172 /*!
173  * KernelMemorySystem is a logical abstraction of the GPU memory system. This
174  * type is instantiated in VGPU guest/GSP Client as well as the VGPU
175  * host/GSP-RM.
176  *
177  * When KernelMemorySystem wants to read or write hardware state, it does not
178  * have access to the registers on the GPU, it can however perform operations
179  * using the following mechanisms:
180  *
181  * 1.) access registers are virtualized across VFs, e.g.: registers within
182  * NV_VIRTUAL_FUNCTION_PRIV_XYZ.
183  *
184  * 2.) send a RPC to the VGPU Host/GSP-RM to perform the operation.
185  *
186  * Operations such as "get memory system bus width" are appropriate for this
187  * interface. Anything related to managing of the memory page
188  * tables/allocations should live in MemoryManager.
189  */
190 
191 
192 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
193 // the matching C source file, but causes diagnostics to be issued if another
194 // source file references the field.
195 #ifdef NVOC_KERN_MEM_SYS_H_PRIVATE_ACCESS_ALLOWED
196 #define PRIVATE_FIELD(x) x
197 #else
198 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
199 #endif
200 
201 struct KernelMemorySystem {
202     const struct NVOC_RTTI *__nvoc_rtti;
203     struct OBJENGSTATE __nvoc_base_OBJENGSTATE;
204     struct Object *__nvoc_pbase_Object;
205     struct OBJENGSTATE *__nvoc_pbase_OBJENGSTATE;
206     struct KernelMemorySystem *__nvoc_pbase_KernelMemorySystem;
207     NV_STATUS (*__kmemsysConstructEngine__)(OBJGPU *, struct KernelMemorySystem *, ENGDESCRIPTOR);
208     NV_STATUS (*__kmemsysStateInitLocked__)(OBJGPU *, struct KernelMemorySystem *);
209     NV_STATUS (*__kmemsysStatePreLoad__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
210     NV_STATUS (*__kmemsysStatePostLoad__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
211     NV_STATUS (*__kmemsysStateLoad__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
212     NV_STATUS (*__kmemsysStatePreUnload__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
213     NV_STATUS (*__kmemsysStateUnload__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
214     void (*__kmemsysStateDestroy__)(OBJGPU *, struct KernelMemorySystem *);
215     NV_STATUS (*__kmemsysGetFbNumaInfo__)(OBJGPU *, struct KernelMemorySystem *, NvU64 *, NvU64 *, NvS32 *);
216     NV_STATUS (*__kmemsysReadUsableFbSize__)(OBJGPU *, struct KernelMemorySystem *, NvU64 *);
217     NV_STATUS (*__kmemsysGetUsableFbSize__)(OBJGPU *, struct KernelMemorySystem *, NvU64 *);
218     NV_STATUS (*__kmemsysCacheOp__)(OBJGPU *, struct KernelMemorySystem *, PMEMORY_DESCRIPTOR, FB_CACHE_MEMTYPE, FB_CACHE_OP);
219     NV_STATUS (*__kmemsysDoCacheOp__)(OBJGPU *, struct KernelMemorySystem *, NvU32, NvU32, NvU32, PRMTIMEOUT);
220     NvU32 (*__kmemsysReadL2SysmemInvalidateReg__)(OBJGPU *, struct KernelMemorySystem *);
221     void (*__kmemsysWriteL2SysmemInvalidateReg__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
222     NvU32 (*__kmemsysReadL2PeermemInvalidateReg__)(OBJGPU *, struct KernelMemorySystem *);
223     void (*__kmemsysWriteL2PeermemInvalidateReg__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
224     NV_STATUS (*__kmemsysInitFlushSysmemBuffer__)(OBJGPU *, struct KernelMemorySystem *);
225     void (*__kmemsysProgramSysmemFlushBuffer__)(OBJGPU *, struct KernelMemorySystem *);
226     NvU32 (*__kmemsysGetFlushSysmemBufferAddrShift__)(OBJGPU *, struct KernelMemorySystem *);
227     NvBool (*__kmemsysIsPagePLCable__)(OBJGPU *, struct KernelMemorySystem *, NvU64, NvU64);
228     NV_STATUS (*__kmemsysReadMIGMemoryCfg__)(OBJGPU *, struct KernelMemorySystem *);
229     NV_STATUS (*__kmemsysInitMIGMemoryPartitionTable__)(OBJGPU *, struct KernelMemorySystem *);
230     NV_STATUS (*__kmemsysSwizzIdToVmmuSegmentsRange__)(OBJGPU *, struct KernelMemorySystem *, NvU32, NvU32, NvU32);
231     NV_STATUS (*__kmemsysNumaAddMemory__)(OBJGPU *, struct KernelMemorySystem *, NvU32, NvU64, NvU64, NvS32 *);
232     void (*__kmemsysNumaRemoveMemory__)(OBJGPU *, struct KernelMemorySystem *, NvU32);
233     void (*__kmemsysNumaRemoveAllMemory__)(OBJGPU *, struct KernelMemorySystem *);
234     NV_STATUS (*__kmemsysPopulateMIGGPUInstanceMemConfig__)(OBJGPU *, struct KernelMemorySystem *);
235     NV_STATUS (*__kmemsysSetupAllAtsPeers__)(OBJGPU *, struct KernelMemorySystem *);
236     void (*__kmemsysRemoveAllAtsPeers__)(OBJGPU *, struct KernelMemorySystem *);
237     NvBool (*__kmemsysAssertFbAckTimeoutPending__)(OBJGPU *, struct KernelMemorySystem *);
238     NvU32 (*__kmemsysGetMaxFbpas__)(OBJGPU *, struct KernelMemorySystem *);
239     NvU32 (*__kmemsysGetEccDedCountSize__)(OBJGPU *, struct KernelMemorySystem *);
240     NvU32 (*__kmemsysGetEccDedCountRegAddr__)(OBJGPU *, struct KernelMemorySystem *, NvU32, NvU32);
241     NvU16 (*__kmemsysGetMaximumBlacklistPages__)(OBJGPU *, struct KernelMemorySystem *);
242     NV_STATUS (*__kmemsysGetFbInfos__)(OBJGPU *, struct KernelMemorySystem *, struct RsClient *, Device *, NvHandle, NV2080_CTRL_FB_GET_INFO_V2_PARAMS *, NvU64 *);
243     NV_STATUS (*__kmemsysStatePostUnload__)(POBJGPU, struct KernelMemorySystem *, NvU32);
244     NV_STATUS (*__kmemsysStateInitUnlocked__)(POBJGPU, struct KernelMemorySystem *);
245     void (*__kmemsysInitMissing__)(POBJGPU, struct KernelMemorySystem *);
246     NV_STATUS (*__kmemsysStatePreInitLocked__)(POBJGPU, struct KernelMemorySystem *);
247     NV_STATUS (*__kmemsysStatePreInitUnlocked__)(POBJGPU, struct KernelMemorySystem *);
248     NvBool (*__kmemsysIsPresent__)(POBJGPU, struct KernelMemorySystem *);
249     NvBool bDisableTiledCachingInvalidatesWithEccBug1521641;
250     NvBool bGpuCacheEnable;
251     NvBool bNumaNodesAdded;
252     NvBool bL2CleanFbPull;
253     NvU32 l2WriteMode;
254     NvBool bPreserveComptagBackingStoreOnSuspend;
255     NvBool bBug3656943WAR;
256     NvU32 overrideToGMK;
257     NvBool bDisablePlcForCertainOffsetsBug3046774;
258     const MEMORY_SYSTEM_STATIC_CONFIG *pStaticConfig;
259     MEM_PARTITION_NUMA_INFO *memPartitionNumaInfo;
260     MIG_MEM_BOUNDARY_CONFIG_TABLE memBoundaryCfgTable;
261     MIG_GPU_INSTANCE_MEMORY_CONFIG gpuInstanceMemConfig[15];
262     NV2080_CTRL_INTERNAL_MEMSYS_GET_MIG_MEMORY_PARTITION_TABLE_PARAMS migMemoryPartitionTable;
263     PMEMORY_DESCRIPTOR pSysmemFlushBufferMemDesc;
264     NvU64 sysmemFlushBuffer;
265     NvU64 fbOverrideStartKb;
266     NvU64 coherentCpuFbBase;
267     NvU64 coherentCpuFbEnd;
268     NvU64 coherentRsvdFbBase;
269     NvU64 numaOnlineBase;
270     NvU64 numaOnlineSize;
271     NvU64 numaMigPartitionSize[15];
272     NvBool bNumaMigPartitionSizeEnumerated;
273 };
274 
275 #ifndef __NVOC_CLASS_KernelMemorySystem_TYPEDEF__
276 #define __NVOC_CLASS_KernelMemorySystem_TYPEDEF__
277 typedef struct KernelMemorySystem KernelMemorySystem;
278 #endif /* __NVOC_CLASS_KernelMemorySystem_TYPEDEF__ */
279 
280 #ifndef __nvoc_class_id_KernelMemorySystem
281 #define __nvoc_class_id_KernelMemorySystem 0x7faff1
282 #endif /* __nvoc_class_id_KernelMemorySystem */
283 
284 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelMemorySystem;
285 
286 #define __staticCast_KernelMemorySystem(pThis) \
287     ((pThis)->__nvoc_pbase_KernelMemorySystem)
288 
289 #ifdef __nvoc_kern_mem_sys_h_disabled
290 #define __dynamicCast_KernelMemorySystem(pThis) ((KernelMemorySystem*)NULL)
291 #else //__nvoc_kern_mem_sys_h_disabled
292 #define __dynamicCast_KernelMemorySystem(pThis) \
293     ((KernelMemorySystem*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelMemorySystem)))
294 #endif //__nvoc_kern_mem_sys_h_disabled
295 
296 #define PDB_PROP_KMEMSYS_IS_MISSING_BASE_CAST __nvoc_base_OBJENGSTATE.
297 #define PDB_PROP_KMEMSYS_IS_MISSING_BASE_NAME PDB_PROP_ENGSTATE_IS_MISSING
298 
299 NV_STATUS __nvoc_objCreateDynamic_KernelMemorySystem(KernelMemorySystem**, Dynamic*, NvU32, va_list);
300 
301 NV_STATUS __nvoc_objCreate_KernelMemorySystem(KernelMemorySystem**, Dynamic*, NvU32);
302 #define __objCreate_KernelMemorySystem(ppNewObj, pParent, createFlags) \
303     __nvoc_objCreate_KernelMemorySystem((ppNewObj), staticCast((pParent), Dynamic), (createFlags))
304 
305 #define kmemsysConstructEngine(pGpu, pKernelMemorySystem, arg0) kmemsysConstructEngine_DISPATCH(pGpu, pKernelMemorySystem, arg0)
306 #define kmemsysStateInitLocked(pGpu, pKernelMemorySystem) kmemsysStateInitLocked_DISPATCH(pGpu, pKernelMemorySystem)
307 #define kmemsysStatePreLoad(pGpu, pKernelMemorySystem, flags) kmemsysStatePreLoad_DISPATCH(pGpu, pKernelMemorySystem, flags)
308 #define kmemsysStatePostLoad(pGpu, pKernelMemorySystem, flags) kmemsysStatePostLoad_DISPATCH(pGpu, pKernelMemorySystem, flags)
309 #define kmemsysStateLoad(pGpu, pKernelMemorySystem, flags) kmemsysStateLoad_DISPATCH(pGpu, pKernelMemorySystem, flags)
310 #define kmemsysStateLoad_HAL(pGpu, pKernelMemorySystem, flags) kmemsysStateLoad_DISPATCH(pGpu, pKernelMemorySystem, flags)
311 #define kmemsysStatePreUnload(pGpu, pKernelMemorySystem, flags) kmemsysStatePreUnload_DISPATCH(pGpu, pKernelMemorySystem, flags)
312 #define kmemsysStateUnload(pGpu, pKernelMemorySystem, flags) kmemsysStateUnload_DISPATCH(pGpu, pKernelMemorySystem, flags)
313 #define kmemsysStateUnload_HAL(pGpu, pKernelMemorySystem, flags) kmemsysStateUnload_DISPATCH(pGpu, pKernelMemorySystem, flags)
314 #define kmemsysStateDestroy(pGpu, pKernelMemorySystem) kmemsysStateDestroy_DISPATCH(pGpu, pKernelMemorySystem)
315 #define kmemsysGetFbNumaInfo(pGpu, pKernelMemorySystem, physAddr, rsvdPhysAddr, numaNodeId) kmemsysGetFbNumaInfo_DISPATCH(pGpu, pKernelMemorySystem, physAddr, rsvdPhysAddr, numaNodeId)
316 #define kmemsysGetFbNumaInfo_HAL(pGpu, pKernelMemorySystem, physAddr, rsvdPhysAddr, numaNodeId) kmemsysGetFbNumaInfo_DISPATCH(pGpu, pKernelMemorySystem, physAddr, rsvdPhysAddr, numaNodeId)
317 #define kmemsysReadUsableFbSize(pGpu, pKernelMemorySystem, pFbSize) kmemsysReadUsableFbSize_DISPATCH(pGpu, pKernelMemorySystem, pFbSize)
318 #define kmemsysReadUsableFbSize_HAL(pGpu, pKernelMemorySystem, pFbSize) kmemsysReadUsableFbSize_DISPATCH(pGpu, pKernelMemorySystem, pFbSize)
319 #define kmemsysGetUsableFbSize(pGpu, pKernelMemorySystem, pFbSize) kmemsysGetUsableFbSize_DISPATCH(pGpu, pKernelMemorySystem, pFbSize)
320 #define kmemsysGetUsableFbSize_HAL(pGpu, pKernelMemorySystem, pFbSize) kmemsysGetUsableFbSize_DISPATCH(pGpu, pKernelMemorySystem, pFbSize)
321 #define kmemsysCacheOp(pGpu, pKernelMemorySystem, arg0, arg1, operation) kmemsysCacheOp_DISPATCH(pGpu, pKernelMemorySystem, arg0, arg1, operation)
322 #define kmemsysCacheOp_HAL(pGpu, pKernelMemorySystem, arg0, arg1, operation) kmemsysCacheOp_DISPATCH(pGpu, pKernelMemorySystem, arg0, arg1, operation)
323 #define kmemsysDoCacheOp(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3) kmemsysDoCacheOp_DISPATCH(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3)
324 #define kmemsysDoCacheOp_HAL(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3) kmemsysDoCacheOp_DISPATCH(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3)
325 #define kmemsysReadL2SysmemInvalidateReg(pGpu, pKernelMemorySystem) kmemsysReadL2SysmemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem)
326 #define kmemsysReadL2SysmemInvalidateReg_HAL(pGpu, pKernelMemorySystem) kmemsysReadL2SysmemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem)
327 #define kmemsysWriteL2SysmemInvalidateReg(pGpu, pKernelMemorySystem, arg0) kmemsysWriteL2SysmemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem, arg0)
328 #define kmemsysWriteL2SysmemInvalidateReg_HAL(pGpu, pKernelMemorySystem, arg0) kmemsysWriteL2SysmemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem, arg0)
329 #define kmemsysReadL2PeermemInvalidateReg(pGpu, pKernelMemorySystem) kmemsysReadL2PeermemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem)
330 #define kmemsysReadL2PeermemInvalidateReg_HAL(pGpu, pKernelMemorySystem) kmemsysReadL2PeermemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem)
331 #define kmemsysWriteL2PeermemInvalidateReg(pGpu, pKernelMemorySystem, arg0) kmemsysWriteL2PeermemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem, arg0)
332 #define kmemsysWriteL2PeermemInvalidateReg_HAL(pGpu, pKernelMemorySystem, arg0) kmemsysWriteL2PeermemInvalidateReg_DISPATCH(pGpu, pKernelMemorySystem, arg0)
333 #define kmemsysInitFlushSysmemBuffer(pGpu, pKernelMemorySystem) kmemsysInitFlushSysmemBuffer_DISPATCH(pGpu, pKernelMemorySystem)
334 #define kmemsysInitFlushSysmemBuffer_HAL(pGpu, pKernelMemorySystem) kmemsysInitFlushSysmemBuffer_DISPATCH(pGpu, pKernelMemorySystem)
335 #define kmemsysProgramSysmemFlushBuffer(pGpu, pKernelMemorySystem) kmemsysProgramSysmemFlushBuffer_DISPATCH(pGpu, pKernelMemorySystem)
336 #define kmemsysProgramSysmemFlushBuffer_HAL(pGpu, pKernelMemorySystem) kmemsysProgramSysmemFlushBuffer_DISPATCH(pGpu, pKernelMemorySystem)
337 #define kmemsysGetFlushSysmemBufferAddrShift(pGpu, pKernelMemorySystem) kmemsysGetFlushSysmemBufferAddrShift_DISPATCH(pGpu, pKernelMemorySystem)
338 #define kmemsysGetFlushSysmemBufferAddrShift_HAL(pGpu, pKernelMemorySystem) kmemsysGetFlushSysmemBufferAddrShift_DISPATCH(pGpu, pKernelMemorySystem)
339 #define kmemsysIsPagePLCable(pGpu, KernelMemorySystem, physAddr, pageSize) kmemsysIsPagePLCable_DISPATCH(pGpu, KernelMemorySystem, physAddr, pageSize)
340 #define kmemsysIsPagePLCable_HAL(pGpu, KernelMemorySystem, physAddr, pageSize) kmemsysIsPagePLCable_DISPATCH(pGpu, KernelMemorySystem, physAddr, pageSize)
341 #define kmemsysReadMIGMemoryCfg(pGpu, pKernelMemorySystem) kmemsysReadMIGMemoryCfg_DISPATCH(pGpu, pKernelMemorySystem)
342 #define kmemsysReadMIGMemoryCfg_HAL(pGpu, pKernelMemorySystem) kmemsysReadMIGMemoryCfg_DISPATCH(pGpu, pKernelMemorySystem)
343 #define kmemsysInitMIGMemoryPartitionTable(pGpu, pKernelMemorySystem) kmemsysInitMIGMemoryPartitionTable_DISPATCH(pGpu, pKernelMemorySystem)
344 #define kmemsysInitMIGMemoryPartitionTable_HAL(pGpu, pKernelMemorySystem) kmemsysInitMIGMemoryPartitionTable_DISPATCH(pGpu, pKernelMemorySystem)
345 #define kmemsysSwizzIdToVmmuSegmentsRange(pGpu, pKernelMemorySystem, swizzId, vmmuSegmentSize, totalVmmuSegments) kmemsysSwizzIdToVmmuSegmentsRange_DISPATCH(pGpu, pKernelMemorySystem, swizzId, vmmuSegmentSize, totalVmmuSegments)
346 #define kmemsysSwizzIdToVmmuSegmentsRange_HAL(pGpu, pKernelMemorySystem, swizzId, vmmuSegmentSize, totalVmmuSegments) kmemsysSwizzIdToVmmuSegmentsRange_DISPATCH(pGpu, pKernelMemorySystem, swizzId, vmmuSegmentSize, totalVmmuSegments)
347 #define kmemsysNumaAddMemory(pGpu, pKernelMemorySystem, swizzId, offset, size, numaNodeId) kmemsysNumaAddMemory_DISPATCH(pGpu, pKernelMemorySystem, swizzId, offset, size, numaNodeId)
348 #define kmemsysNumaAddMemory_HAL(pGpu, pKernelMemorySystem, swizzId, offset, size, numaNodeId) kmemsysNumaAddMemory_DISPATCH(pGpu, pKernelMemorySystem, swizzId, offset, size, numaNodeId)
349 #define kmemsysNumaRemoveMemory(pGpu, pKernelMemorySystem, swizzId) kmemsysNumaRemoveMemory_DISPATCH(pGpu, pKernelMemorySystem, swizzId)
350 #define kmemsysNumaRemoveMemory_HAL(pGpu, pKernelMemorySystem, swizzId) kmemsysNumaRemoveMemory_DISPATCH(pGpu, pKernelMemorySystem, swizzId)
351 #define kmemsysNumaRemoveAllMemory(pGpu, pKernelMemorySystem) kmemsysNumaRemoveAllMemory_DISPATCH(pGpu, pKernelMemorySystem)
352 #define kmemsysNumaRemoveAllMemory_HAL(pGpu, pKernelMemorySystem) kmemsysNumaRemoveAllMemory_DISPATCH(pGpu, pKernelMemorySystem)
353 #define kmemsysPopulateMIGGPUInstanceMemConfig(pGpu, pKernelMemorySystem) kmemsysPopulateMIGGPUInstanceMemConfig_DISPATCH(pGpu, pKernelMemorySystem)
354 #define kmemsysPopulateMIGGPUInstanceMemConfig_HAL(pGpu, pKernelMemorySystem) kmemsysPopulateMIGGPUInstanceMemConfig_DISPATCH(pGpu, pKernelMemorySystem)
355 #define kmemsysSetupAllAtsPeers(pGpu, pKernelMemorySystem) kmemsysSetupAllAtsPeers_DISPATCH(pGpu, pKernelMemorySystem)
356 #define kmemsysSetupAllAtsPeers_HAL(pGpu, pKernelMemorySystem) kmemsysSetupAllAtsPeers_DISPATCH(pGpu, pKernelMemorySystem)
357 #define kmemsysRemoveAllAtsPeers(pGpu, pKernelMemorySystem) kmemsysRemoveAllAtsPeers_DISPATCH(pGpu, pKernelMemorySystem)
358 #define kmemsysRemoveAllAtsPeers_HAL(pGpu, pKernelMemorySystem) kmemsysRemoveAllAtsPeers_DISPATCH(pGpu, pKernelMemorySystem)
359 #define kmemsysAssertFbAckTimeoutPending(pGpu, pKernelMemorySystem) kmemsysAssertFbAckTimeoutPending_DISPATCH(pGpu, pKernelMemorySystem)
360 #define kmemsysAssertFbAckTimeoutPending_HAL(pGpu, pKernelMemorySystem) kmemsysAssertFbAckTimeoutPending_DISPATCH(pGpu, pKernelMemorySystem)
361 #define kmemsysGetMaxFbpas(pGpu, pKernelMemorySystem) kmemsysGetMaxFbpas_DISPATCH(pGpu, pKernelMemorySystem)
362 #define kmemsysGetMaxFbpas_HAL(pGpu, pKernelMemorySystem) kmemsysGetMaxFbpas_DISPATCH(pGpu, pKernelMemorySystem)
363 #define kmemsysGetEccDedCountSize(pGpu, pKernelMemorySystem) kmemsysGetEccDedCountSize_DISPATCH(pGpu, pKernelMemorySystem)
364 #define kmemsysGetEccDedCountSize_HAL(pGpu, pKernelMemorySystem) kmemsysGetEccDedCountSize_DISPATCH(pGpu, pKernelMemorySystem)
365 #define kmemsysGetEccDedCountRegAddr(pGpu, pKernelMemorySystem, fbpa, subp) kmemsysGetEccDedCountRegAddr_DISPATCH(pGpu, pKernelMemorySystem, fbpa, subp)
366 #define kmemsysGetEccDedCountRegAddr_HAL(pGpu, pKernelMemorySystem, fbpa, subp) kmemsysGetEccDedCountRegAddr_DISPATCH(pGpu, pKernelMemorySystem, fbpa, subp)
367 #define kmemsysGetMaximumBlacklistPages(pGpu, pKernelMemorySystem) kmemsysGetMaximumBlacklistPages_DISPATCH(pGpu, pKernelMemorySystem)
368 #define kmemsysGetMaximumBlacklistPages_HAL(pGpu, pKernelMemorySystem) kmemsysGetMaximumBlacklistPages_DISPATCH(pGpu, pKernelMemorySystem)
369 #define kmemsysGetFbInfos(arg0, arg1, arg2, arg3, hSubdevice, pParams, pFbInfoListIndicesUnset) kmemsysGetFbInfos_DISPATCH(arg0, arg1, arg2, arg3, hSubdevice, pParams, pFbInfoListIndicesUnset)
370 #define kmemsysGetFbInfos_HAL(arg0, arg1, arg2, arg3, hSubdevice, pParams, pFbInfoListIndicesUnset) kmemsysGetFbInfos_DISPATCH(arg0, arg1, arg2, arg3, hSubdevice, pParams, pFbInfoListIndicesUnset)
371 #define kmemsysStatePostUnload(pGpu, pEngstate, arg0) kmemsysStatePostUnload_DISPATCH(pGpu, pEngstate, arg0)
372 #define kmemsysStateInitUnlocked(pGpu, pEngstate) kmemsysStateInitUnlocked_DISPATCH(pGpu, pEngstate)
373 #define kmemsysInitMissing(pGpu, pEngstate) kmemsysInitMissing_DISPATCH(pGpu, pEngstate)
374 #define kmemsysStatePreInitLocked(pGpu, pEngstate) kmemsysStatePreInitLocked_DISPATCH(pGpu, pEngstate)
375 #define kmemsysStatePreInitUnlocked(pGpu, pEngstate) kmemsysStatePreInitUnlocked_DISPATCH(pGpu, pEngstate)
376 #define kmemsysIsPresent(pGpu, pEngstate) kmemsysIsPresent_DISPATCH(pGpu, pEngstate)
kmemsysAssertSysmemFlushBufferValid_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)377 static inline void kmemsysAssertSysmemFlushBufferValid_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
378     return;
379 }
380 
381 void kmemsysAssertSysmemFlushBufferValid_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
382 
383 void kmemsysAssertSysmemFlushBufferValid_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
384 
385 void kmemsysAssertSysmemFlushBufferValid_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
386 
387 
388 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysAssertSysmemFlushBufferValid(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)389 static inline void kmemsysAssertSysmemFlushBufferValid(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
390     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
391 }
392 #else //__nvoc_kern_mem_sys_h_disabled
393 #define kmemsysAssertSysmemFlushBufferValid(pGpu, pKernelMemorySystem) kmemsysAssertSysmemFlushBufferValid_b3696a(pGpu, pKernelMemorySystem)
394 #endif //__nvoc_kern_mem_sys_h_disabled
395 
396 #define kmemsysAssertSysmemFlushBufferValid_HAL(pGpu, pKernelMemorySystem) kmemsysAssertSysmemFlushBufferValid(pGpu, pKernelMemorySystem)
397 
398 NV_STATUS kmemsysInitStaticConfig_KERNEL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, MEMORY_SYSTEM_STATIC_CONFIG *pConfig);
399 
400 
401 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysInitStaticConfig(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,MEMORY_SYSTEM_STATIC_CONFIG * pConfig)402 static inline NV_STATUS kmemsysInitStaticConfig(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, MEMORY_SYSTEM_STATIC_CONFIG *pConfig) {
403     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
404     return NV_ERR_NOT_SUPPORTED;
405 }
406 #else //__nvoc_kern_mem_sys_h_disabled
407 #define kmemsysInitStaticConfig(pGpu, pKernelMemorySystem, pConfig) kmemsysInitStaticConfig_KERNEL(pGpu, pKernelMemorySystem, pConfig)
408 #endif //__nvoc_kern_mem_sys_h_disabled
409 
410 #define kmemsysInitStaticConfig_HAL(pGpu, pKernelMemorySystem, pConfig) kmemsysInitStaticConfig(pGpu, pKernelMemorySystem, pConfig)
411 
kmemsysPreFillCacheOnlyMemory_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 arg0,NvU64 arg1)412 static inline NV_STATUS kmemsysPreFillCacheOnlyMemory_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 arg0, NvU64 arg1) {
413     return NV_OK;
414 }
415 
416 NV_STATUS kmemsysPreFillCacheOnlyMemory_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 arg0, NvU64 arg1);
417 
418 
419 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysPreFillCacheOnlyMemory(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 arg0,NvU64 arg1)420 static inline NV_STATUS kmemsysPreFillCacheOnlyMemory(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 arg0, NvU64 arg1) {
421     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
422     return NV_ERR_NOT_SUPPORTED;
423 }
424 #else //__nvoc_kern_mem_sys_h_disabled
425 #define kmemsysPreFillCacheOnlyMemory(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysPreFillCacheOnlyMemory_56cd7a(pGpu, pKernelMemorySystem, arg0, arg1)
426 #endif //__nvoc_kern_mem_sys_h_disabled
427 
428 #define kmemsysPreFillCacheOnlyMemory_HAL(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysPreFillCacheOnlyMemory(pGpu, pKernelMemorySystem, arg0, arg1)
429 
kmemsysCheckDisplayRemapperRange_14278f(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 arg0,NvU64 arg1)430 static inline NV_STATUS kmemsysCheckDisplayRemapperRange_14278f(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 arg0, NvU64 arg1) {
431     NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_INVALID_STATE);
432 }
433 
434 
435 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysCheckDisplayRemapperRange(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 arg0,NvU64 arg1)436 static inline NV_STATUS kmemsysCheckDisplayRemapperRange(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 arg0, NvU64 arg1) {
437     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
438     return NV_ERR_NOT_SUPPORTED;
439 }
440 #else //__nvoc_kern_mem_sys_h_disabled
441 #define kmemsysCheckDisplayRemapperRange(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysCheckDisplayRemapperRange_14278f(pGpu, pKernelMemorySystem, arg0, arg1)
442 #endif //__nvoc_kern_mem_sys_h_disabled
443 
444 #define kmemsysCheckDisplayRemapperRange_HAL(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysCheckDisplayRemapperRange(pGpu, pKernelMemorySystem, arg0, arg1)
445 
kmemsysPostHeapCreate_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)446 static inline void kmemsysPostHeapCreate_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
447     return;
448 }
449 
450 
451 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysPostHeapCreate(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)452 static inline void kmemsysPostHeapCreate(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
453     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
454 }
455 #else //__nvoc_kern_mem_sys_h_disabled
456 #define kmemsysPostHeapCreate(pGpu, pKernelMemorySystem) kmemsysPostHeapCreate_b3696a(pGpu, pKernelMemorySystem)
457 #endif //__nvoc_kern_mem_sys_h_disabled
458 
459 #define kmemsysPostHeapCreate_HAL(pGpu, pKernelMemorySystem) kmemsysPostHeapCreate(pGpu, pKernelMemorySystem)
460 
kmemsysPreHeapDestruct_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)461 static inline void kmemsysPreHeapDestruct_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
462     return;
463 }
464 
465 
466 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysPreHeapDestruct(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)467 static inline void kmemsysPreHeapDestruct(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
468     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
469 }
470 #else //__nvoc_kern_mem_sys_h_disabled
471 #define kmemsysPreHeapDestruct(pGpu, pKernelMemorySystem) kmemsysPreHeapDestruct_b3696a(pGpu, pKernelMemorySystem)
472 #endif //__nvoc_kern_mem_sys_h_disabled
473 
474 #define kmemsysPreHeapDestruct_HAL(pGpu, pKernelMemorySystem) kmemsysPreHeapDestruct(pGpu, pKernelMemorySystem)
475 
476 NV_STATUS kmemsysAllocComprResources_KERNEL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, FB_ALLOC_INFO *arg0, NvU64 arg1, NvU32 arg2, NvU32 *arg3, NvU32 arg4);
477 
478 
479 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysAllocComprResources(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,FB_ALLOC_INFO * arg0,NvU64 arg1,NvU32 arg2,NvU32 * arg3,NvU32 arg4)480 static inline NV_STATUS kmemsysAllocComprResources(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, FB_ALLOC_INFO *arg0, NvU64 arg1, NvU32 arg2, NvU32 *arg3, NvU32 arg4) {
481     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
482     return NV_ERR_NOT_SUPPORTED;
483 }
484 #else //__nvoc_kern_mem_sys_h_disabled
485 #define kmemsysAllocComprResources(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3, arg4) kmemsysAllocComprResources_KERNEL(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3, arg4)
486 #endif //__nvoc_kern_mem_sys_h_disabled
487 
488 #define kmemsysAllocComprResources_HAL(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3, arg4) kmemsysAllocComprResources(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3, arg4)
489 
kmemsysFreeComprResources_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 hwResId)490 static inline void kmemsysFreeComprResources_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 hwResId) {
491     return;
492 }
493 
494 
495 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysFreeComprResources(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 hwResId)496 static inline void kmemsysFreeComprResources(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 hwResId) {
497     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
498 }
499 #else //__nvoc_kern_mem_sys_h_disabled
500 #define kmemsysFreeComprResources(pGpu, pKernelMemorySystem, hwResId) kmemsysFreeComprResources_b3696a(pGpu, pKernelMemorySystem, hwResId)
501 #endif //__nvoc_kern_mem_sys_h_disabled
502 
503 #define kmemsysFreeComprResources_HAL(pGpu, pKernelMemorySystem, hwResId) kmemsysFreeComprResources(pGpu, pKernelMemorySystem, hwResId)
504 
505 NvBool kmemsysNeedInvalidateGpuCacheOnMap_GV100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bIsVolatile, NvU32 aperture);
506 
507 
508 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysNeedInvalidateGpuCacheOnMap(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvBool bIsVolatile,NvU32 aperture)509 static inline NvBool kmemsysNeedInvalidateGpuCacheOnMap(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bIsVolatile, NvU32 aperture) {
510     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
511     return NV_FALSE;
512 }
513 #else //__nvoc_kern_mem_sys_h_disabled
514 #define kmemsysNeedInvalidateGpuCacheOnMap(pGpu, pKernelMemorySystem, bIsVolatile, aperture) kmemsysNeedInvalidateGpuCacheOnMap_GV100(pGpu, pKernelMemorySystem, bIsVolatile, aperture)
515 #endif //__nvoc_kern_mem_sys_h_disabled
516 
517 #define kmemsysNeedInvalidateGpuCacheOnMap_HAL(pGpu, pKernelMemorySystem, bIsVolatile, aperture) kmemsysNeedInvalidateGpuCacheOnMap(pGpu, pKernelMemorySystem, bIsVolatile, aperture)
518 
kmemsysCbcIsSafe_cbe027(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)519 static inline NvBool kmemsysCbcIsSafe_cbe027(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
520     return ((NvBool)(0 == 0));
521 }
522 
523 
524 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysCbcIsSafe(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)525 static inline NvBool kmemsysCbcIsSafe(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
526     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
527     return NV_FALSE;
528 }
529 #else //__nvoc_kern_mem_sys_h_disabled
530 #define kmemsysCbcIsSafe(pGpu, pKernelMemorySystem) kmemsysCbcIsSafe_cbe027(pGpu, pKernelMemorySystem)
531 #endif //__nvoc_kern_mem_sys_h_disabled
532 
533 #define kmemsysCbcIsSafe_HAL(pGpu, pKernelMemorySystem) kmemsysCbcIsSafe(pGpu, pKernelMemorySystem)
534 
535 void kmemsysGetEccCounts_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 *arg0, NvU32 *arg1);
536 
537 
538 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysGetEccCounts(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 * arg0,NvU32 * arg1)539 static inline void kmemsysGetEccCounts(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 *arg0, NvU32 *arg1) {
540     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
541 }
542 #else //__nvoc_kern_mem_sys_h_disabled
543 #define kmemsysGetEccCounts(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysGetEccCounts_TU102(pGpu, pKernelMemorySystem, arg0, arg1)
544 #endif //__nvoc_kern_mem_sys_h_disabled
545 
546 #define kmemsysGetEccCounts_HAL(pGpu, pKernelMemorySystem, arg0, arg1) kmemsysGetEccCounts(pGpu, pKernelMemorySystem, arg0, arg1)
547 
kmemsysPrepareForXVEReset_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)548 static inline NV_STATUS kmemsysPrepareForXVEReset_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
549     return NV_OK;
550 }
551 
552 
553 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysPrepareForXVEReset(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)554 static inline NV_STATUS kmemsysPrepareForXVEReset(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
555     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
556     return NV_ERR_NOT_SUPPORTED;
557 }
558 #else //__nvoc_kern_mem_sys_h_disabled
559 #define kmemsysPrepareForXVEReset(pGpu, pKernelMemorySystem) kmemsysPrepareForXVEReset_56cd7a(pGpu, pKernelMemorySystem)
560 #endif //__nvoc_kern_mem_sys_h_disabled
561 
562 #define kmemsysPrepareForXVEReset_HAL(pGpu, pKernelMemorySystem) kmemsysPrepareForXVEReset(pGpu, pKernelMemorySystem)
563 
564 NV_STATUS kmemsysConstructEngine_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, ENGDESCRIPTOR arg0);
565 
kmemsysConstructEngine_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,ENGDESCRIPTOR arg0)566 static inline NV_STATUS kmemsysConstructEngine_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, ENGDESCRIPTOR arg0) {
567     return pKernelMemorySystem->__kmemsysConstructEngine__(pGpu, pKernelMemorySystem, arg0);
568 }
569 
570 NV_STATUS kmemsysStateInitLocked_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
571 
kmemsysStateInitLocked_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)572 static inline NV_STATUS kmemsysStateInitLocked_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
573     return pKernelMemorySystem->__kmemsysStateInitLocked__(pGpu, pKernelMemorySystem);
574 }
575 
576 NV_STATUS kmemsysStatePreLoad_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
577 
kmemsysStatePreLoad_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)578 static inline NV_STATUS kmemsysStatePreLoad_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
579     return pKernelMemorySystem->__kmemsysStatePreLoad__(pGpu, pKernelMemorySystem, flags);
580 }
581 
582 NV_STATUS kmemsysStatePostLoad_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
583 
kmemsysStatePostLoad_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)584 static inline NV_STATUS kmemsysStatePostLoad_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
585     return pKernelMemorySystem->__kmemsysStatePostLoad__(pGpu, pKernelMemorySystem, flags);
586 }
587 
588 NV_STATUS kmemsysStateLoad_VF(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
589 
kmemsysStateLoad_ac1694(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)590 static inline NV_STATUS kmemsysStateLoad_ac1694(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
591     return NV_OK;
592 }
593 
kmemsysStateLoad_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)594 static inline NV_STATUS kmemsysStateLoad_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
595     return pKernelMemorySystem->__kmemsysStateLoad__(pGpu, pKernelMemorySystem, flags);
596 }
597 
598 NV_STATUS kmemsysStatePreUnload_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
599 
kmemsysStatePreUnload_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)600 static inline NV_STATUS kmemsysStatePreUnload_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
601     return pKernelMemorySystem->__kmemsysStatePreUnload__(pGpu, pKernelMemorySystem, flags);
602 }
603 
604 NV_STATUS kmemsysStateUnload_VF(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
605 
kmemsysStateUnload_ac1694(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)606 static inline NV_STATUS kmemsysStateUnload_ac1694(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
607     return NV_OK;
608 }
609 
kmemsysStateUnload_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)610 static inline NV_STATUS kmemsysStateUnload_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
611     return pKernelMemorySystem->__kmemsysStateUnload__(pGpu, pKernelMemorySystem, flags);
612 }
613 
614 void kmemsysStateDestroy_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
615 
kmemsysStateDestroy_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)616 static inline void kmemsysStateDestroy_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
617     pKernelMemorySystem->__kmemsysStateDestroy__(pGpu, pKernelMemorySystem);
618 }
619 
620 NV_STATUS kmemsysGetFbNumaInfo_GV100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *physAddr, NvU64 *rsvdPhysAddr, NvS32 *numaNodeId);
621 
kmemsysGetFbNumaInfo_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 * physAddr,NvU64 * rsvdPhysAddr,NvS32 * numaNodeId)622 static inline NV_STATUS kmemsysGetFbNumaInfo_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *physAddr, NvU64 *rsvdPhysAddr, NvS32 *numaNodeId) {
623     return NV_OK;
624 }
625 
kmemsysGetFbNumaInfo_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 * physAddr,NvU64 * rsvdPhysAddr,NvS32 * numaNodeId)626 static inline NV_STATUS kmemsysGetFbNumaInfo_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *physAddr, NvU64 *rsvdPhysAddr, NvS32 *numaNodeId) {
627     return pKernelMemorySystem->__kmemsysGetFbNumaInfo__(pGpu, pKernelMemorySystem, physAddr, rsvdPhysAddr, numaNodeId);
628 }
629 
630 NV_STATUS kmemsysReadUsableFbSize_GP102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize);
631 
632 NV_STATUS kmemsysReadUsableFbSize_GA102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize);
633 
kmemsysReadUsableFbSize_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 * pFbSize)634 static inline NV_STATUS kmemsysReadUsableFbSize_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize) {
635     return pKernelMemorySystem->__kmemsysReadUsableFbSize__(pGpu, pKernelMemorySystem, pFbSize);
636 }
637 
638 NV_STATUS kmemsysGetUsableFbSize_KERNEL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize);
639 
kmemsysGetUsableFbSize_5baef9(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 * pFbSize)640 static inline NV_STATUS kmemsysGetUsableFbSize_5baef9(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize) {
641     NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_NOT_SUPPORTED);
642 }
643 
kmemsysGetUsableFbSize_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU64 * pFbSize)644 static inline NV_STATUS kmemsysGetUsableFbSize_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU64 *pFbSize) {
645     return pKernelMemorySystem->__kmemsysGetUsableFbSize__(pGpu, pKernelMemorySystem, pFbSize);
646 }
647 
648 NV_STATUS kmemsysCacheOp_GM200(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, PMEMORY_DESCRIPTOR arg0, FB_CACHE_MEMTYPE arg1, FB_CACHE_OP operation);
649 
650 NV_STATUS kmemsysCacheOp_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, PMEMORY_DESCRIPTOR arg0, FB_CACHE_MEMTYPE arg1, FB_CACHE_OP operation);
651 
kmemsysCacheOp_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,PMEMORY_DESCRIPTOR arg0,FB_CACHE_MEMTYPE arg1,FB_CACHE_OP operation)652 static inline NV_STATUS kmemsysCacheOp_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, PMEMORY_DESCRIPTOR arg0, FB_CACHE_MEMTYPE arg1, FB_CACHE_OP operation) {
653     return pKernelMemorySystem->__kmemsysCacheOp__(pGpu, pKernelMemorySystem, arg0, arg1, operation);
654 }
655 
656 NV_STATUS kmemsysDoCacheOp_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0, NvU32 arg1, NvU32 arg2, PRMTIMEOUT arg3);
657 
658 NV_STATUS kmemsysDoCacheOp_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0, NvU32 arg1, NvU32 arg2, PRMTIMEOUT arg3);
659 
kmemsysDoCacheOp_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 arg0,NvU32 arg1,NvU32 arg2,PRMTIMEOUT arg3)660 static inline NV_STATUS kmemsysDoCacheOp_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0, NvU32 arg1, NvU32 arg2, PRMTIMEOUT arg3) {
661     return pKernelMemorySystem->__kmemsysDoCacheOp__(pGpu, pKernelMemorySystem, arg0, arg1, arg2, arg3);
662 }
663 
664 NvU32 kmemsysReadL2SysmemInvalidateReg_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
665 
kmemsysReadL2SysmemInvalidateReg_68b109(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)666 static inline NvU32 kmemsysReadL2SysmemInvalidateReg_68b109(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
667     NV_ASSERT_OR_RETURN_PRECOMP(0, -1);
668 }
669 
kmemsysReadL2SysmemInvalidateReg_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)670 static inline NvU32 kmemsysReadL2SysmemInvalidateReg_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
671     return pKernelMemorySystem->__kmemsysReadL2SysmemInvalidateReg__(pGpu, pKernelMemorySystem);
672 }
673 
674 void kmemsysWriteL2SysmemInvalidateReg_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0);
675 
kmemsysWriteL2SysmemInvalidateReg_f2d351(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 arg0)676 static inline void kmemsysWriteL2SysmemInvalidateReg_f2d351(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0) {
677     NV_ASSERT_PRECOMP(0);
678 }
679 
kmemsysWriteL2SysmemInvalidateReg_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 arg0)680 static inline void kmemsysWriteL2SysmemInvalidateReg_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0) {
681     pKernelMemorySystem->__kmemsysWriteL2SysmemInvalidateReg__(pGpu, pKernelMemorySystem, arg0);
682 }
683 
684 NvU32 kmemsysReadL2PeermemInvalidateReg_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
685 
kmemsysReadL2PeermemInvalidateReg_68b109(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)686 static inline NvU32 kmemsysReadL2PeermemInvalidateReg_68b109(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
687     NV_ASSERT_OR_RETURN_PRECOMP(0, -1);
688 }
689 
kmemsysReadL2PeermemInvalidateReg_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)690 static inline NvU32 kmemsysReadL2PeermemInvalidateReg_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
691     return pKernelMemorySystem->__kmemsysReadL2PeermemInvalidateReg__(pGpu, pKernelMemorySystem);
692 }
693 
694 void kmemsysWriteL2PeermemInvalidateReg_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0);
695 
kmemsysWriteL2PeermemInvalidateReg_f2d351(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 arg0)696 static inline void kmemsysWriteL2PeermemInvalidateReg_f2d351(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0) {
697     NV_ASSERT_PRECOMP(0);
698 }
699 
kmemsysWriteL2PeermemInvalidateReg_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 arg0)700 static inline void kmemsysWriteL2PeermemInvalidateReg_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 arg0) {
701     pKernelMemorySystem->__kmemsysWriteL2PeermemInvalidateReg__(pGpu, pKernelMemorySystem, arg0);
702 }
703 
kmemsysInitFlushSysmemBuffer_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)704 static inline NV_STATUS kmemsysInitFlushSysmemBuffer_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
705     return NV_OK;
706 }
707 
708 NV_STATUS kmemsysInitFlushSysmemBuffer_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
709 
710 NV_STATUS kmemsysInitFlushSysmemBuffer_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
711 
kmemsysInitFlushSysmemBuffer_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)712 static inline NV_STATUS kmemsysInitFlushSysmemBuffer_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
713     return pKernelMemorySystem->__kmemsysInitFlushSysmemBuffer__(pGpu, pKernelMemorySystem);
714 }
715 
kmemsysProgramSysmemFlushBuffer_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)716 static inline void kmemsysProgramSysmemFlushBuffer_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
717     return;
718 }
719 
720 void kmemsysProgramSysmemFlushBuffer_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
721 
722 void kmemsysProgramSysmemFlushBuffer_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
723 
724 void kmemsysProgramSysmemFlushBuffer_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
725 
kmemsysProgramSysmemFlushBuffer_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)726 static inline void kmemsysProgramSysmemFlushBuffer_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
727     pKernelMemorySystem->__kmemsysProgramSysmemFlushBuffer__(pGpu, pKernelMemorySystem);
728 }
729 
kmemsysGetFlushSysmemBufferAddrShift_4a4dee(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)730 static inline NvU32 kmemsysGetFlushSysmemBufferAddrShift_4a4dee(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
731     return 0;
732 }
733 
734 NvU32 kmemsysGetFlushSysmemBufferAddrShift_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
735 
kmemsysGetFlushSysmemBufferAddrShift_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)736 static inline NvU32 kmemsysGetFlushSysmemBufferAddrShift_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
737     return pKernelMemorySystem->__kmemsysGetFlushSysmemBufferAddrShift__(pGpu, pKernelMemorySystem);
738 }
739 
kmemsysIsPagePLCable_cbe027(OBJGPU * pGpu,struct KernelMemorySystem * KernelMemorySystem,NvU64 physAddr,NvU64 pageSize)740 static inline NvBool kmemsysIsPagePLCable_cbe027(OBJGPU *pGpu, struct KernelMemorySystem *KernelMemorySystem, NvU64 physAddr, NvU64 pageSize) {
741     return ((NvBool)(0 == 0));
742 }
743 
744 NvBool kmemsysIsPagePLCable_GA100(OBJGPU *pGpu, struct KernelMemorySystem *KernelMemorySystem, NvU64 physAddr, NvU64 pageSize);
745 
746 NvBool kmemsysIsPagePLCable_GA102(OBJGPU *pGpu, struct KernelMemorySystem *KernelMemorySystem, NvU64 physAddr, NvU64 pageSize);
747 
kmemsysIsPagePLCable_510167(OBJGPU * pGpu,struct KernelMemorySystem * KernelMemorySystem,NvU64 physAddr,NvU64 pageSize)748 static inline NvBool kmemsysIsPagePLCable_510167(OBJGPU *pGpu, struct KernelMemorySystem *KernelMemorySystem, NvU64 physAddr, NvU64 pageSize) {
749     NV_ASSERT_OR_RETURN_PRECOMP(0, ((NvBool)(0 == 0)));
750 }
751 
kmemsysIsPagePLCable_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * KernelMemorySystem,NvU64 physAddr,NvU64 pageSize)752 static inline NvBool kmemsysIsPagePLCable_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *KernelMemorySystem, NvU64 physAddr, NvU64 pageSize) {
753     return KernelMemorySystem->__kmemsysIsPagePLCable__(pGpu, KernelMemorySystem, physAddr, pageSize);
754 }
755 
kmemsysReadMIGMemoryCfg_46f6a7(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)756 static inline NV_STATUS kmemsysReadMIGMemoryCfg_46f6a7(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
757     return NV_ERR_NOT_SUPPORTED;
758 }
759 
760 NV_STATUS kmemsysReadMIGMemoryCfg_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
761 
kmemsysReadMIGMemoryCfg_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)762 static inline NV_STATUS kmemsysReadMIGMemoryCfg_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
763     return pKernelMemorySystem->__kmemsysReadMIGMemoryCfg__(pGpu, pKernelMemorySystem);
764 }
765 
kmemsysInitMIGMemoryPartitionTable_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)766 static inline NV_STATUS kmemsysInitMIGMemoryPartitionTable_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
767     return NV_OK;
768 }
769 
770 NV_STATUS kmemsysInitMIGMemoryPartitionTable_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
771 
kmemsysInitMIGMemoryPartitionTable_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)772 static inline NV_STATUS kmemsysInitMIGMemoryPartitionTable_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
773     return pKernelMemorySystem->__kmemsysInitMIGMemoryPartitionTable__(pGpu, pKernelMemorySystem);
774 }
775 
776 NV_STATUS kmemsysSwizzIdToVmmuSegmentsRange_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU32 vmmuSegmentSize, NvU32 totalVmmuSegments);
777 
778 NV_STATUS kmemsysSwizzIdToVmmuSegmentsRange_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU32 vmmuSegmentSize, NvU32 totalVmmuSegments);
779 
kmemsysSwizzIdToVmmuSegmentsRange_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,NvU32 vmmuSegmentSize,NvU32 totalVmmuSegments)780 static inline NV_STATUS kmemsysSwizzIdToVmmuSegmentsRange_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU32 vmmuSegmentSize, NvU32 totalVmmuSegments) {
781     return pKernelMemorySystem->__kmemsysSwizzIdToVmmuSegmentsRange__(pGpu, pKernelMemorySystem, swizzId, vmmuSegmentSize, totalVmmuSegments);
782 }
783 
784 NV_STATUS kmemsysNumaAddMemory_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU64 offset, NvU64 size, NvS32 *numaNodeId);
785 
kmemsysNumaAddMemory_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,NvU64 offset,NvU64 size,NvS32 * numaNodeId)786 static inline NV_STATUS kmemsysNumaAddMemory_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU64 offset, NvU64 size, NvS32 *numaNodeId) {
787     return NV_OK;
788 }
789 
kmemsysNumaAddMemory_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,NvU64 offset,NvU64 size,NvS32 * numaNodeId)790 static inline NV_STATUS kmemsysNumaAddMemory_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, NvU64 offset, NvU64 size, NvS32 *numaNodeId) {
791     return pKernelMemorySystem->__kmemsysNumaAddMemory__(pGpu, pKernelMemorySystem, swizzId, offset, size, numaNodeId);
792 }
793 
794 void kmemsysNumaRemoveMemory_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId);
795 
kmemsysNumaRemoveMemory_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId)796 static inline void kmemsysNumaRemoveMemory_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId) {
797     return;
798 }
799 
kmemsysNumaRemoveMemory_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId)800 static inline void kmemsysNumaRemoveMemory_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId) {
801     pKernelMemorySystem->__kmemsysNumaRemoveMemory__(pGpu, pKernelMemorySystem, swizzId);
802 }
803 
804 void kmemsysNumaRemoveAllMemory_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
805 
kmemsysNumaRemoveAllMemory_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)806 static inline void kmemsysNumaRemoveAllMemory_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
807     return;
808 }
809 
kmemsysNumaRemoveAllMemory_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)810 static inline void kmemsysNumaRemoveAllMemory_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
811     pKernelMemorySystem->__kmemsysNumaRemoveAllMemory__(pGpu, pKernelMemorySystem);
812 }
813 
kmemsysPopulateMIGGPUInstanceMemConfig_56cd7a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)814 static inline NV_STATUS kmemsysPopulateMIGGPUInstanceMemConfig_56cd7a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
815     return NV_OK;
816 }
817 
818 NV_STATUS kmemsysPopulateMIGGPUInstanceMemConfig_KERNEL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
819 
kmemsysPopulateMIGGPUInstanceMemConfig_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)820 static inline NV_STATUS kmemsysPopulateMIGGPUInstanceMemConfig_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
821     return pKernelMemorySystem->__kmemsysPopulateMIGGPUInstanceMemConfig__(pGpu, pKernelMemorySystem);
822 }
823 
kmemsysSetupAllAtsPeers_46f6a7(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)824 static inline NV_STATUS kmemsysSetupAllAtsPeers_46f6a7(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
825     return NV_ERR_NOT_SUPPORTED;
826 }
827 
828 NV_STATUS kmemsysSetupAllAtsPeers_GV100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
829 
kmemsysSetupAllAtsPeers_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)830 static inline NV_STATUS kmemsysSetupAllAtsPeers_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
831     return pKernelMemorySystem->__kmemsysSetupAllAtsPeers__(pGpu, pKernelMemorySystem);
832 }
833 
kmemsysRemoveAllAtsPeers_b3696a(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)834 static inline void kmemsysRemoveAllAtsPeers_b3696a(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
835     return;
836 }
837 
838 void kmemsysRemoveAllAtsPeers_GV100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
839 
kmemsysRemoveAllAtsPeers_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)840 static inline void kmemsysRemoveAllAtsPeers_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
841     pKernelMemorySystem->__kmemsysRemoveAllAtsPeers__(pGpu, pKernelMemorySystem);
842 }
843 
844 NvBool kmemsysAssertFbAckTimeoutPending_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
845 
kmemsysAssertFbAckTimeoutPending_491d52(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)846 static inline NvBool kmemsysAssertFbAckTimeoutPending_491d52(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
847     return ((NvBool)(0 != 0));
848 }
849 
kmemsysAssertFbAckTimeoutPending_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)850 static inline NvBool kmemsysAssertFbAckTimeoutPending_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
851     return pKernelMemorySystem->__kmemsysAssertFbAckTimeoutPending__(pGpu, pKernelMemorySystem);
852 }
853 
854 NvU32 kmemsysGetMaxFbpas_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
855 
856 NvU32 kmemsysGetMaxFbpas_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
857 
kmemsysGetMaxFbpas_4a4dee(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)858 static inline NvU32 kmemsysGetMaxFbpas_4a4dee(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
859     return 0;
860 }
861 
kmemsysGetMaxFbpas_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)862 static inline NvU32 kmemsysGetMaxFbpas_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
863     return pKernelMemorySystem->__kmemsysGetMaxFbpas__(pGpu, pKernelMemorySystem);
864 }
865 
866 NvU32 kmemsysGetEccDedCountSize_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
867 
868 NvU32 kmemsysGetEccDedCountSize_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
869 
kmemsysGetEccDedCountSize_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)870 static inline NvU32 kmemsysGetEccDedCountSize_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
871     return pKernelMemorySystem->__kmemsysGetEccDedCountSize__(pGpu, pKernelMemorySystem);
872 }
873 
874 NvU32 kmemsysGetEccDedCountRegAddr_TU102(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 fbpa, NvU32 subp);
875 
876 NvU32 kmemsysGetEccDedCountRegAddr_GH100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 fbpa, NvU32 subp);
877 
kmemsysGetEccDedCountRegAddr_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 fbpa,NvU32 subp)878 static inline NvU32 kmemsysGetEccDedCountRegAddr_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 fbpa, NvU32 subp) {
879     return pKernelMemorySystem->__kmemsysGetEccDedCountRegAddr__(pGpu, pKernelMemorySystem, fbpa, subp);
880 }
881 
882 NvU16 kmemsysGetMaximumBlacklistPages_GM107(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
883 
884 NvU16 kmemsysGetMaximumBlacklistPages_GA100(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
885 
kmemsysGetMaximumBlacklistPages_DISPATCH(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)886 static inline NvU16 kmemsysGetMaximumBlacklistPages_DISPATCH(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
887     return pKernelMemorySystem->__kmemsysGetMaximumBlacklistPages__(pGpu, pKernelMemorySystem);
888 }
889 
kmemsysGetFbInfos_ac1694(OBJGPU * arg0,struct KernelMemorySystem * arg1,struct RsClient * arg2,Device * arg3,NvHandle hSubdevice,NV2080_CTRL_FB_GET_INFO_V2_PARAMS * pParams,NvU64 * pFbInfoListIndicesUnset)890 static inline NV_STATUS kmemsysGetFbInfos_ac1694(OBJGPU *arg0, struct KernelMemorySystem *arg1, struct RsClient *arg2, Device *arg3, NvHandle hSubdevice, NV2080_CTRL_FB_GET_INFO_V2_PARAMS *pParams, NvU64 *pFbInfoListIndicesUnset) {
891     return NV_OK;
892 }
893 
894 NV_STATUS kmemsysGetFbInfos_VF(OBJGPU *arg0, struct KernelMemorySystem *arg1, struct RsClient *arg2, Device *arg3, NvHandle hSubdevice, NV2080_CTRL_FB_GET_INFO_V2_PARAMS *pParams, NvU64 *pFbInfoListIndicesUnset);
895 
kmemsysGetFbInfos_DISPATCH(OBJGPU * arg0,struct KernelMemorySystem * arg1,struct RsClient * arg2,Device * arg3,NvHandle hSubdevice,NV2080_CTRL_FB_GET_INFO_V2_PARAMS * pParams,NvU64 * pFbInfoListIndicesUnset)896 static inline NV_STATUS kmemsysGetFbInfos_DISPATCH(OBJGPU *arg0, struct KernelMemorySystem *arg1, struct RsClient *arg2, Device *arg3, NvHandle hSubdevice, NV2080_CTRL_FB_GET_INFO_V2_PARAMS *pParams, NvU64 *pFbInfoListIndicesUnset) {
897     return arg1->__kmemsysGetFbInfos__(arg0, arg1, arg2, arg3, hSubdevice, pParams, pFbInfoListIndicesUnset);
898 }
899 
kmemsysStatePostUnload_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate,NvU32 arg0)900 static inline NV_STATUS kmemsysStatePostUnload_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate, NvU32 arg0) {
901     return pEngstate->__kmemsysStatePostUnload__(pGpu, pEngstate, arg0);
902 }
903 
kmemsysStateInitUnlocked_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate)904 static inline NV_STATUS kmemsysStateInitUnlocked_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate) {
905     return pEngstate->__kmemsysStateInitUnlocked__(pGpu, pEngstate);
906 }
907 
kmemsysInitMissing_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate)908 static inline void kmemsysInitMissing_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate) {
909     pEngstate->__kmemsysInitMissing__(pGpu, pEngstate);
910 }
911 
kmemsysStatePreInitLocked_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate)912 static inline NV_STATUS kmemsysStatePreInitLocked_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate) {
913     return pEngstate->__kmemsysStatePreInitLocked__(pGpu, pEngstate);
914 }
915 
kmemsysStatePreInitUnlocked_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate)916 static inline NV_STATUS kmemsysStatePreInitUnlocked_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate) {
917     return pEngstate->__kmemsysStatePreInitUnlocked__(pGpu, pEngstate);
918 }
919 
kmemsysIsPresent_DISPATCH(POBJGPU pGpu,struct KernelMemorySystem * pEngstate)920 static inline NvBool kmemsysIsPresent_DISPATCH(POBJGPU pGpu, struct KernelMemorySystem *pEngstate) {
921     return pEngstate->__kmemsysIsPresent__(pGpu, pEngstate);
922 }
923 
kmemsysIsL2CleanFbPull(struct KernelMemorySystem * pKernelMemorySystem)924 static inline NvBool kmemsysIsL2CleanFbPull(struct KernelMemorySystem *pKernelMemorySystem) {
925     return pKernelMemorySystem->bL2CleanFbPull;
926 }
927 
928 void kmemsysDestruct_IMPL(struct KernelMemorySystem *pKernelMemorySystem);
929 
930 #define __nvoc_kmemsysDestruct(pKernelMemorySystem) kmemsysDestruct_IMPL(pKernelMemorySystem)
931 NV_STATUS kmemsysEnsureSysmemFlushBufferInitialized_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
932 
933 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysEnsureSysmemFlushBufferInitialized(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)934 static inline NV_STATUS kmemsysEnsureSysmemFlushBufferInitialized(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
935     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
936     return NV_ERR_NOT_SUPPORTED;
937 }
938 #else //__nvoc_kern_mem_sys_h_disabled
939 #define kmemsysEnsureSysmemFlushBufferInitialized(pGpu, pKernelMemorySystem) kmemsysEnsureSysmemFlushBufferInitialized_IMPL(pGpu, pKernelMemorySystem)
940 #endif //__nvoc_kern_mem_sys_h_disabled
941 
942 const MEMORY_SYSTEM_STATIC_CONFIG *kmemsysGetStaticConfig_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
943 
944 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysGetStaticConfig(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)945 static inline const MEMORY_SYSTEM_STATIC_CONFIG *kmemsysGetStaticConfig(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
946     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
947     return NULL;
948 }
949 #else //__nvoc_kern_mem_sys_h_disabled
950 #define kmemsysGetStaticConfig(pGpu, pKernelMemorySystem) kmemsysGetStaticConfig_IMPL(pGpu, pKernelMemorySystem)
951 #endif //__nvoc_kern_mem_sys_h_disabled
952 
953 NV_STATUS kmemsysSetupCoherentCpuLink_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bFlush);
954 
955 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysSetupCoherentCpuLink(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvBool bFlush)956 static inline NV_STATUS kmemsysSetupCoherentCpuLink(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bFlush) {
957     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
958     return NV_ERR_NOT_SUPPORTED;
959 }
960 #else //__nvoc_kern_mem_sys_h_disabled
961 #define kmemsysSetupCoherentCpuLink(pGpu, pKernelMemorySystem, bFlush) kmemsysSetupCoherentCpuLink_IMPL(pGpu, pKernelMemorySystem, bFlush)
962 #endif //__nvoc_kern_mem_sys_h_disabled
963 
964 void kmemsysTeardownCoherentCpuLink_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bFlush);
965 
966 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysTeardownCoherentCpuLink(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvBool bFlush)967 static inline void kmemsysTeardownCoherentCpuLink(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvBool bFlush) {
968     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
969 }
970 #else //__nvoc_kern_mem_sys_h_disabled
971 #define kmemsysTeardownCoherentCpuLink(pGpu, pKernelMemorySystem, bFlush) kmemsysTeardownCoherentCpuLink_IMPL(pGpu, pKernelMemorySystem, bFlush)
972 #endif //__nvoc_kern_mem_sys_h_disabled
973 
974 NV_STATUS kmemsysSendL2InvalidateEvict_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags);
975 
976 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysSendL2InvalidateEvict(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 flags)977 static inline NV_STATUS kmemsysSendL2InvalidateEvict(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 flags) {
978     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
979     return NV_ERR_NOT_SUPPORTED;
980 }
981 #else //__nvoc_kern_mem_sys_h_disabled
982 #define kmemsysSendL2InvalidateEvict(pGpu, pKernelMemorySystem, flags) kmemsysSendL2InvalidateEvict_IMPL(pGpu, pKernelMemorySystem, flags)
983 #endif //__nvoc_kern_mem_sys_h_disabled
984 
985 NV_STATUS kmemsysSendFlushL2AllRamsAndCaches_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem);
986 
987 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysSendFlushL2AllRamsAndCaches(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem)988 static inline NV_STATUS kmemsysSendFlushL2AllRamsAndCaches(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem) {
989     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
990     return NV_ERR_NOT_SUPPORTED;
991 }
992 #else //__nvoc_kern_mem_sys_h_disabled
993 #define kmemsysSendFlushL2AllRamsAndCaches(pGpu, pKernelMemorySystem) kmemsysSendFlushL2AllRamsAndCaches_IMPL(pGpu, pKernelMemorySystem)
994 #endif //__nvoc_kern_mem_sys_h_disabled
995 
996 NV_STATUS kmemsysSwizzIdToMIGMemSize_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE totalRange, NvU32 *pPartitionSizeFlag, NvU64 *pSizeInBytes);
997 
998 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysSwizzIdToMIGMemSize(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,struct NV_RANGE totalRange,NvU32 * pPartitionSizeFlag,NvU64 * pSizeInBytes)999 static inline NV_STATUS kmemsysSwizzIdToMIGMemSize(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE totalRange, NvU32 *pPartitionSizeFlag, NvU64 *pSizeInBytes) {
1000     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
1001     return NV_ERR_NOT_SUPPORTED;
1002 }
1003 #else //__nvoc_kern_mem_sys_h_disabled
1004 #define kmemsysSwizzIdToMIGMemSize(pGpu, pKernelMemorySystem, swizzId, totalRange, pPartitionSizeFlag, pSizeInBytes) kmemsysSwizzIdToMIGMemSize_IMPL(pGpu, pKernelMemorySystem, swizzId, totalRange, pPartitionSizeFlag, pSizeInBytes)
1005 #endif //__nvoc_kern_mem_sys_h_disabled
1006 
1007 NV_STATUS kmemsysSwizzIdToMIGMemRange_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE totalRange, struct NV_RANGE *pAddrRange);
1008 
1009 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysSwizzIdToMIGMemRange(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,struct NV_RANGE totalRange,struct NV_RANGE * pAddrRange)1010 static inline NV_STATUS kmemsysSwizzIdToMIGMemRange(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE totalRange, struct NV_RANGE *pAddrRange) {
1011     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
1012     return NV_ERR_NOT_SUPPORTED;
1013 }
1014 #else //__nvoc_kern_mem_sys_h_disabled
1015 #define kmemsysSwizzIdToMIGMemRange(pGpu, pKernelMemorySystem, swizzId, totalRange, pAddrRange) kmemsysSwizzIdToMIGMemRange_IMPL(pGpu, pKernelMemorySystem, swizzId, totalRange, pAddrRange)
1016 #endif //__nvoc_kern_mem_sys_h_disabled
1017 
1018 NV_STATUS kmemsysGetMIGGPUInstanceMemInfo_IMPL(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE *pAddrRange);
1019 
1020 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysGetMIGGPUInstanceMemInfo(OBJGPU * pGpu,struct KernelMemorySystem * pKernelMemorySystem,NvU32 swizzId,struct NV_RANGE * pAddrRange)1021 static inline NV_STATUS kmemsysGetMIGGPUInstanceMemInfo(OBJGPU *pGpu, struct KernelMemorySystem *pKernelMemorySystem, NvU32 swizzId, struct NV_RANGE *pAddrRange) {
1022     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
1023     return NV_ERR_NOT_SUPPORTED;
1024 }
1025 #else //__nvoc_kern_mem_sys_h_disabled
1026 #define kmemsysGetMIGGPUInstanceMemInfo(pGpu, pKernelMemorySystem, swizzId, pAddrRange) kmemsysGetMIGGPUInstanceMemInfo_IMPL(pGpu, pKernelMemorySystem, swizzId, pAddrRange)
1027 #endif //__nvoc_kern_mem_sys_h_disabled
1028 
1029 NV_STATUS kmemsysGetMIGGPUInstanceMemConfigFromSwizzId_IMPL(OBJGPU *arg0, struct KernelMemorySystem *arg1, NvU32 swizzId, const MIG_GPU_INSTANCE_MEMORY_CONFIG **arg2);
1030 
1031 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysGetMIGGPUInstanceMemConfigFromSwizzId(OBJGPU * arg0,struct KernelMemorySystem * arg1,NvU32 swizzId,const MIG_GPU_INSTANCE_MEMORY_CONFIG ** arg2)1032 static inline NV_STATUS kmemsysGetMIGGPUInstanceMemConfigFromSwizzId(OBJGPU *arg0, struct KernelMemorySystem *arg1, NvU32 swizzId, const MIG_GPU_INSTANCE_MEMORY_CONFIG **arg2) {
1033     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
1034     return NV_ERR_NOT_SUPPORTED;
1035 }
1036 #else //__nvoc_kern_mem_sys_h_disabled
1037 #define kmemsysGetMIGGPUInstanceMemConfigFromSwizzId(arg0, arg1, swizzId, arg2) kmemsysGetMIGGPUInstanceMemConfigFromSwizzId_IMPL(arg0, arg1, swizzId, arg2)
1038 #endif //__nvoc_kern_mem_sys_h_disabled
1039 
1040 NV_STATUS kmemsysInitMIGGPUInstanceMemConfigForSwizzId_IMPL(OBJGPU *arg0, struct KernelMemorySystem *arg1, NvU32 swizzId, NvU64 startingVmmuSegment, NvU64 memSizeInVmmuSegment);
1041 
1042 #ifdef __nvoc_kern_mem_sys_h_disabled
kmemsysInitMIGGPUInstanceMemConfigForSwizzId(OBJGPU * arg0,struct KernelMemorySystem * arg1,NvU32 swizzId,NvU64 startingVmmuSegment,NvU64 memSizeInVmmuSegment)1043 static inline NV_STATUS kmemsysInitMIGGPUInstanceMemConfigForSwizzId(OBJGPU *arg0, struct KernelMemorySystem *arg1, NvU32 swizzId, NvU64 startingVmmuSegment, NvU64 memSizeInVmmuSegment) {
1044     NV_ASSERT_FAILED_PRECOMP("KernelMemorySystem was disabled!");
1045     return NV_ERR_NOT_SUPPORTED;
1046 }
1047 #else //__nvoc_kern_mem_sys_h_disabled
1048 #define kmemsysInitMIGGPUInstanceMemConfigForSwizzId(arg0, arg1, swizzId, startingVmmuSegment, memSizeInVmmuSegment) kmemsysInitMIGGPUInstanceMemConfigForSwizzId_IMPL(arg0, arg1, swizzId, startingVmmuSegment, memSizeInVmmuSegment)
1049 #endif //__nvoc_kern_mem_sys_h_disabled
1050 
1051 #undef PRIVATE_FIELD
1052 
1053 
1054 #define IS_COHERENT_CPU_ATS_OFFSET(kmemsys, offset, length)                             \
1055     (kmemsys && ((offset) >= (kmemsys->coherentCpuFbBase + kmemsys->numaOnlineBase)) && \
1056      (((NvU64)offset + length) <= (kmemsys->coherentCpuFbBase + kmemsys->numaOnlineBase + kmemsys->numaOnlineSize)))
1057 
1058 #define IS_COHERENT_FB_OFFSET(kmemsys, offset, length)                        \
1059     (kmemsys && (kmemsys->numaOnlineSize == 0) &&                             \
1060      ((offset) >= (kmemsys->coherentCpuFbBase)) &&                            \
1061      (((NvU64)offset + length) <= (kmemsys->coherentCpuFbEnd)))
1062 
1063 #endif // KERN_MEM_SYS_H
1064 
1065 #ifdef __cplusplus
1066 } // extern "C"
1067 #endif
1068 
1069 #endif // _G_KERN_MEM_SYS_NVOC_H_
1070