1 #ifndef _G_MEM_MGR_NVOC_H_ 2 #define _G_MEM_MGR_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 1993-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_mem_mgr_nvoc.h" 33 34 #ifndef MEM_MGR_H 35 #define MEM_MGR_H 36 37 #include "core/core.h" 38 #include "core/info_block.h" 39 #include "gpu/eng_state.h" 40 41 #include "gpu/mem_mgr/fbsr.h" 42 #include "gpu/gpu.h" 43 44 #include "mem_mgr/mem.h" 45 46 #include "mem_mgr/mem_list.h" 47 48 #include "gpu/mem_mgr/virt_mem_allocator_common.h" 49 #include "containers/map.h" 50 #include "gpu/mem_mgr/heap_base.h" 51 #include "mem_mgr/vaspace.h" 52 53 #include "gpu/mem_mgr/phys_mem_allocator/phys_mem_allocator.h" 54 55 struct CeUtils; 56 57 #ifndef __NVOC_CLASS_CeUtils_TYPEDEF__ 58 #define __NVOC_CLASS_CeUtils_TYPEDEF__ 59 typedef struct CeUtils CeUtils; 60 #endif /* __NVOC_CLASS_CeUtils_TYPEDEF__ */ 61 62 #ifndef __nvoc_class_id_CeUtils 63 #define __nvoc_class_id_CeUtils 0x8b8bae 64 #endif /* __nvoc_class_id_CeUtils */ 65 66 67 68 typedef volatile struct _cl906f_tag1 Nv906fControl; 69 typedef struct KERNEL_MIG_GPU_INSTANCE KERNEL_MIG_GPU_INSTANCE; 70 71 typedef struct 72 { 73 MEMORY_DESCRIPTOR *pMemDesc; 74 NvU64 offset; 75 } TRANSFER_SURFACE; 76 77 // Memory transfer engine types. 78 typedef enum 79 { 80 TRANSFER_TYPE_PROCESSOR = 0, // CPU/GSP/DPU depending on execution context 81 TRANSFER_TYPE_GSP_DMA, // Dma engine internal to GSP 82 TRANSFER_TYPE_CE, // Copy Engine using CeUtils channel 83 TRANSFER_TYPE_CE_PRI, // Copy Engine using PRIs 84 TRANSFER_TYPE_BAR0, // Copy using BAR0 PRAMIN 85 } TRANSFER_TYPE; 86 87 #define TRANSFER_FLAGS_NONE 0 88 #define TRANSFER_FLAGS_DEFER_FLUSH NVBIT32(0) // Applicable only for write operations 89 #define TRANSFER_FLAGS_SHADOW_ALLOC NVBIT32(1) // Applicable only for non-PROCESSOR transfers 90 #define TRANSFER_FLAGS_SHADOW_INIT_MEM NVBIT32(2) // Applicable only for non-PROCESSOR transfers 91 #define TRANSFER_FLAGS_PERSISTENT_CPU_MAPPING NVBIT32(3) // Require long lived PROCESSOR mapping 92 #define TRANSFER_FLAGS_DESTROY_MAPPING NVBIT32(4) // Destroy any cached mappings when complete 93 #define TRANSFER_FLAGS_USE_BAR1 NVBIT32(5) // Use only BAR1 for PROCESSOR transfers 94 #define TRANSFER_FLAGS_PREFER_CE NVBIT32(6) // Use CE if possible (BAR0 on simulation for perf) 95 #define TRANSFER_FLAGS_CE_PRI_DEFER_FLUSH NVBIT32(7) // Defer CE flush; only affects PRI CE operations 96 97 // Protection flags: at most 1 may be set, none means READ_WRITE by default 98 #define TRANSFER_FLAGS_MAP_PROTECT_READABLE NVBIT32(8) // Transfer is only reading data 99 #define TRANSFER_FLAGS_MAP_PROTECT_WRITEABLE NVBIT32(9) // Transfer is only writing data 100 101 typedef struct 102 { 103 NvU32 bar1Size; 104 NvU32 bar1AvailSize; 105 NvU32 bankSwizzleAlignment; 106 NvU32 bar1MaxContigAvailSize; 107 } GETBAR1INFO, *PGETBAR1INFO; 108 109 // 110 // RM Default PTE kind 111 // Bug #2242255, introducing the RM Default kind to allow sharing memory between 112 // different architectures especially between Turing+ and Pre Turing chips 113 // 114 #define RM_DEFAULT_PTE_KIND 0x100 115 116 typedef enum 117 { 118 FB_IS_KIND_Z, // Kind is a Z buffer 119 FB_IS_KIND_ZBC, // Zero bandwidth clears 120 FB_IS_KIND_ZBC_ALLOWS_1, // ZBC with 1 bit of tag 121 FB_IS_KIND_ZBC_ALLOWS_2, // ZBC with 2 bits of tag 122 FB_IS_KIND_ZBC_ALLOWS_4, // ZBC with 4 bits of tag 123 FB_IS_KIND_COMPRESSIBLE, // Any compressible kind 124 FB_IS_KIND_COMPRESSIBLE_1, // Compressible with 1 comp tag bit 125 FB_IS_KIND_COMPRESSIBLE_2, // Compressible with 2 comp tag bits 126 FB_IS_KIND_COMPRESSIBLE_4, // Compressible with 4 comp tag bits 127 FB_IS_KIND_SUPPORTED, // Kind is supported 128 FB_IS_KIND_DISALLOW_PLC, // Kind Disallows PLC 129 } FB_IS_KIND_OP; 130 131 // Surface compression parameters 132 typedef struct COMPR_INFO 133 { 134 // Surface kind; if not compressed, following parameters are ignored 135 NvU32 kind; 136 137 // Compression page shift; 0 if kind is uncompressed 138 NvU32 compPageShift; 139 140 // 141 // Are comptags are determined per-page by PA? 142 // If set, following parameters are ignored 143 // 144 NvBool bPhysBasedComptags; 145 146 // see GMMU_COMPR_INFO 147 NvU32 compPageIndexLo; 148 NvU32 compPageIndexHi; 149 NvU32 compTagLineMin; 150 NvU32 compTagLineMultiplier; 151 } COMPR_INFO; 152 153 // 154 // Individual entry for logging Fb reserved use-cases 155 // 156 typedef struct NV_FB_RSVD_BLOCK_LOG_ENTRY 157 { 158 // Owner tag associated with reservation block 159 NvU32 ownerId; 160 161 // Size of the memory reserved 162 NvU64 rsvdSize; 163 } NV_FB_RSVD_BLOCK_LOG_ENTRY; 164 165 // Total number of FB internal reservation enries 166 #define NV_FB_RSVD_BLOCK_LOG_ENTRY_MAX 10U 167 168 // 169 // Structure for logging Fb reserved use-cases 170 // 171 typedef struct NV_FB_RSVD_BLOCK_LOG_INFO 172 { 173 // Counter for logging entries 174 NvU32 counter; 175 176 // List of all reserved entries 177 NV_FB_RSVD_BLOCK_LOG_ENTRY rsvdBlockList[NV_FB_RSVD_BLOCK_LOG_ENTRY_MAX]; 178 } NV_FB_RSVD_BLOCK_LOG_INFO; 179 180 // 181 // Macro for initializing reserved block log data 182 // 183 #define NV_FB_RSVD_BLOCK_LOG_INIT(pMem) \ 184 { \ 185 ((pMem)->rsvdBlockInfo).counter = 0; \ 186 for (NvU32 i = 0; i < NV_FB_RSVD_BLOCK_LOG_ENTRY_MAX; i++) \ 187 { \ 188 ((pMem)->rsvdBlockInfo).rsvdBlockList[i].ownerId = 0; \ 189 ((pMem)->rsvdBlockInfo).rsvdBlockList[i].rsvdSize = 0; \ 190 } \ 191 } 192 193 // 194 // Macro for adding new reserved block entry to the list 195 // If unable to log, marks the status as NV_ERR_NO_MEMORY otherwise keeps it unchanged 196 // 197 #define NV_FB_RSVD_BLOCK_LOG_ENTRY_ADD(status, pMem, tag, size) \ 198 { \ 199 if(((pMem)->rsvdBlockInfo).counter < NV_FB_RSVD_BLOCK_LOG_ENTRY_MAX) \ 200 { \ 201 ((pMem)->rsvdBlockInfo).rsvdBlockList[((pMem)->rsvdBlockInfo).counter].ownerId = (tag); \ 202 ((pMem)->rsvdBlockInfo).rsvdBlockList[((pMem)->rsvdBlockInfo).counter].rsvdSize = (size); \ 203 (((pMem)->rsvdBlockInfo).counter)++; \ 204 } \ 205 else \ 206 { \ 207 status = NV_ERR_NO_MEMORY; \ 208 } \ 209 } 210 211 // 212 // Fixed Channel Properties for Memutils Object 213 // 214 215 typedef NV_STATUS FbScrubCallback(OBJGPU *); 216 217 #define BLOCK_INDEX_FROM_ADDR(addr,size) ((NvU32)((addr) >> size)) 218 #define BLOCK_ADDR_FROM_INDEX(idx,size) (((NvU64)(idx)) << size) 219 220 #define MEMUTILS_SIZE_PER_BLOCK_INBYTES (0x68) 221 #define MEMUTILS_TOTAL_SIZE_PER_BLOCK_INBYTES (0x60) //(COPY + PB SEMA) 222 #define MEMUTILS_TD_BLOCKS_PER_CHUNK 0x40 223 224 #define BLOCK_INDEX_FROM_ADDR(addr,size) ((NvU32)((addr) >> size)) 225 #define BLOCK_ADDR_FROM_INDEX(idx,size) (((NvU64)(idx)) << size) 226 227 #define MEMUTILS_NUM_PAYLOAD_SEMAPHORES (2) 228 #define MEMUTILS_NUM_GPFIFIO_ENTRIES (32) 229 // PB size should be a multiple of chunk size 230 #define MEMUTILS_CHANNEL_PB_SIZE (0x10 * MEMUTILS_SIZE_PER_BLOCK_INBYTES * \ 231 MEMUTILS_TD_BLOCKS_PER_CHUNK) 232 #define MEMUTILS_CHANNEL_SEMAPHORE_SIZE (4 * MEMUTILS_NUM_PAYLOAD_SEMAPHORES) 233 #define MEMUTILS_CHANNEL_NOTIFIER_SIZE (sizeof(NvNotification) * 1) 234 235 // offset and line length should be a multiple of 4KB 236 #define MEMUTIL_SCRUB_OFFSET_ALIGNMENT (4 * 1024) 237 #define MEMUTIL_SCRUB_LINE_LENGTH_ALIGNMENT (4 * 1024) 238 239 typedef enum { 240 CE_SCRUBBER_CHANNEL, 241 FAST_SCRUBBER_CHANNEL, 242 COPY_CHANNEL, 243 SWL_SCRUBBER_CHANNEL, 244 MAX_CHANNEL_TYPE 245 } CHANNEL_KIND; 246 247 // This will be moved to a channel object next 248 typedef struct OBJCHANNEL 249 { 250 NvHandle deviceId; // Device Handle 251 NvHandle physMemId; // Memory Handle 252 NvHandle channelId; // Channel Handle 253 NvHandle subdeviceId; // Subdevice Handle 254 NvHandle errNotifierIdVirt; 255 NvHandle errNotifierIdPhys; 256 NvHandle engineObjectId; 257 NvHandle eventId; 258 NvHandle pushBufferId; 259 NvHandle bitMapSemPhysId; 260 NvHandle bitMapSemVirtId; 261 NvHandle hVASpaceId; // VASpace handle, when scrubber in virtual mode 262 NvHandle hFbAlias; // Used only for virtual channels 263 NvHandle hFbAliasVA; 264 // to be moved later 265 266 NvU32 channelSize; 267 NvU32 channelNumGpFifioEntries; 268 NvU32 channelPbSize; 269 NvU32 channelNotifierSize; 270 NvU32 methodSizePerBlock; 271 NvU32 semaOffset; 272 NvU32 finishPayloadOffset; 273 NvU32 authTagBufSemaOffset; 274 NvU32 finishPayload; 275 NvBool isChannelSynchronized; 276 NvBool isProgressChecked; 277 // 278 // RM internal channels are created as privileged channels (physical address access) by default 279 // For MMU Bug: 2739505, we need to switch to use channels in non-privileged mode. 280 // 281 NvBool bUseVasForCeCopy; // set to NV_TRUE, when scrubber operates in virtual address 282 struct RsClient *pRsClient; 283 struct OBJVASPACE *pVAS; 284 NvU32 engineType; 285 NvU64 startFbOffset; 286 NvU64 fbSize; 287 NvU64 fbAliasVA; 288 NvU64 vaStartOffset; 289 // to be moved to a separate object later 290 291 NvU32 *pBlockPendingState; 292 NvU32 *pBlockDoneState; 293 NvU32 blockCount; 294 NvHandle hClient; 295 NvBool bClientAllocated; 296 NvU64 pbGpuVA; 297 NvU64 pbGpuBitMapVA; 298 NvU64 pbGpuNotifierVA; 299 MEMORY_DESCRIPTOR *pUserdMemdesc; 300 MEMORY_DESCRIPTOR *pChannelBufferMemdesc; 301 MEMORY_DESCRIPTOR *pErrNotifierMemdesc; 302 NvU8 *pbCpuVA; 303 NvU8 *pbBitMapVA; 304 Nv906fControl *pControlGPFifo; 305 NvU32 classEngineID; 306 NVOS10_EVENT_KERNEL_CALLBACK_EX callback; 307 NvU32 state; 308 NvU32 hTdCopyClass; 309 NvU32 sec2Class; 310 NvU32 minBlockSize; 311 NvU32 maxBlockSize; 312 NvU32 channelPutOffset; 313 NvU8 blockShift; 314 NvU32 lastPayloadPushed; 315 NvBool isChannelActive; 316 NvU32 workSubmitToken; 317 // 318 // Work submit token read from notifier memory. 319 // 320 NvNotification *pTokenFromNotifier; 321 NvU32 lastSubmittedEntry; 322 NvHandle lastAllocatedHandle; 323 CHANNEL_KIND type; 324 325 // Used for Volta+ 326 NvHandle doorbellRegionHandle; 327 NvU8 *pDoorbellRegion; 328 NvU32 *pDoorbellRegisterOffset; 329 NvBool bUseDoorbellRegister; 330 NvHandle hUserD; 331 NvBool bClientUserd; 332 333 OBJGPU *pGpu; 334 NvU32 ceId; 335 336 // Used by Partition Scrubber 337 KERNEL_MIG_GPU_INSTANCE *pKernelMIGGpuInstance; 338 NvHandle hPartitionRef; 339 } OBJCHANNEL, *POBJCHANNEL; 340 341 #define NV_METHOD(SubCh, Method, Num) \ 342 (DRF_DEF(906F, _DMA_INCR, _OPCODE, _VALUE) | \ 343 DRF_NUM(906F, _DMA_INCR, _COUNT, Num) | \ 344 DRF_NUM(906F, _DMA_INCR, _SUBCHANNEL, SubCh) | \ 345 DRF_NUM(906F, _DMA_INCR, _ADDRESS, (Method) >> 2)) 346 347 #define PUSH_DATA(Data) MEM_WR32(ptr++, (Data)) 348 349 #define PUSH_PAIR(SubCh, Method, Data) \ 350 do \ 351 { \ 352 PUSH_DATA(NV_METHOD(SubCh, (Method), 1)); \ 353 PUSH_DATA((Data)); \ 354 } while (0) 355 356 //----------------------------------------------------------------------------- 357 358 typedef struct 359 { 360 NvU32 lastSubmittedBlock; 361 NvBool isTopDownScrubber; 362 NvBool isActive; 363 NvU32 scrubberState; 364 NvU32 currentFbRegion; 365 NvU32 startBlock; 366 NvU32 endBlock; 367 NvU32 *pPendingBitMap; 368 NvU32 *pDoneBitMap; 369 NvU32 blockCount; 370 struct OBJCE *pCe; 371 NvBool bCeInUse; 372 OBJCHANNEL tdHeapState; 373 OBJCHANNEL allocationScrubberState; 374 } OBJSCRUB, *POBJSCRUB; 375 376 typedef struct 377 { 378 NvU64 base; // Base/start address of the region 379 NvU64 limit; // Last/end address of region 380 NvU64 rsvdSize; // Memory RM may be required to allocate in this region 381 NvBool bRsvdRegion; // Reserved region -- not publicly usable 382 NvU32 performance; // Relative performance. Higher is faster 383 NvBool bSupportCompressed; // Support compressed kinds 384 NvBool bSupportISO; // Support ISO (display, cursor, video) surfaces 385 NvBool bProtected; // Represents a protected region of memory. 386 NvBool bInternalHeap; // PMA:Used for internal RM allocations 387 NvBool bLostOnSuspend; // Not required to be Saved during S/R. 388 } FB_REGION_DESCRIPTOR, *PFB_REGION_DESCRIPTOR; 389 390 #define MAX_FB_REGIONS 16 391 392 // Maximum number of contexts created for WHQL test WDDM Max Contexts 393 #define WHQL_TEST_MAX_CONTEXTS 100 394 395 // Object 'get' macros for FB relative object retrievals. 396 #define MEMORY_MANAGER_GET_HEAP(p) ((p)->pHeap) 397 398 typedef struct _def_fb_mem_node 399 { 400 struct _def_fb_mem_node *pNext; 401 402 NvBool bFreeDescriptor; 403 PMEMORY_DESCRIPTOR pMemDesc; 404 405 } FB_MEM_NODE, *PFB_MEM_NODE; 406 407 // defines for MemoryManager::fbsrReservedRanges 408 #define MAX_FBSR_RESERVED_REGIONS 6 // Max. Memory descriptors for RM Instance memory 409 #define FBSR_RESERVED_INST_MEMORY_BEFORE_BAR2PTE 0 410 #define FBSR_RESERVED_INST_MEMORY_AFTER_BAR2PTE 1 411 #define FBSR_RESERVED_INST_MEMORY_GSP_HEAP 2 412 #define FBSR_RESERVED_INST_MEMORY_GSP_NON_WPR 3 413 #define FBSR_RESERVED_INST_MEMORY_GSP_WPR 4 414 #define FBSR_RESERVED_INST_MEMORY_VGA_WORKSPACE 5 415 416 /*! 417 * MemoryManager provides the root memory management of GPU video memory. 418 * External entities might provide suballocators on top of MemoryManager. 419 * 420 * MemoryManager can have static information on the memory system (e.g.: list of 421 * kinds, etc), however MemoryManager does not have direct access to the GPU 422 * memory system (e.g.: BAR0 registers). It relies on KernelMemorySystem for 423 * operations on the memory system. 424 * 425 * MemoryManager is instantiated in VGPU guest/GSP Client as well as the VGPU 426 * host/GSP-RM. 427 */ 428 429 #define MEM_MGR_STUB_ORIN(...) 430 431 #ifdef NVOC_MEM_MGR_H_PRIVATE_ACCESS_ALLOWED 432 #define PRIVATE_FIELD(x) x 433 #else 434 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 435 #endif 436 struct RM_POOL_ALLOC_MEM_RESERVE_INFO; 437 438 struct __nvoc_inner_struc_MemoryManager_1__ { 439 NvU64 fbUsableMemSize; 440 NvU64 fbTotalMemSizeMb; 441 NvU64 fbAddrSpaceSizeMb; 442 NvU64 mapRamSizeMb; 443 NvU64 fbOverrideSizeMb; 444 NvU64 reservedMemSize; 445 NvU32 numFBRegions; 446 FB_REGION_DESCRIPTOR fbRegion[16]; 447 NvU32 numFBRegionPriority; 448 NvU64 maxFBPSize; 449 NvU64 minFBPSize; 450 NvU32 fbRegionPriority[16]; 451 NvU64 ReservedConsoleDispMemSize; 452 PMEMORY_DESCRIPTOR pReservedConsoleMemDesc; 453 NvU32 lowerRangeMag; 454 NvU32 lowerRangeScale; 455 NvU32 middleRangeMag; 456 NvU32 middleRangeScale; 457 NvU32 upperRangeMag; 458 NvU32 upperRangeScale; 459 }; 460 461 struct MIG_MEMORY_PARTITIONING_INFO { 462 struct NV_RANGE partitionableMemoryRange; 463 struct NV_RANGE partitionableBar1Range; 464 NvHandle hClient; 465 NvHandle hDevice; 466 NvHandle hSubdevice; 467 }; 468 469 470 struct MemoryManager { 471 const struct NVOC_RTTI *__nvoc_rtti; 472 struct OBJENGSTATE __nvoc_base_OBJENGSTATE; 473 struct Object *__nvoc_pbase_Object; 474 struct OBJENGSTATE *__nvoc_pbase_OBJENGSTATE; 475 struct MemoryManager *__nvoc_pbase_MemoryManager; 476 NV_STATUS (*__memmgrConstructEngine__)(OBJGPU *, struct MemoryManager *, ENGDESCRIPTOR); 477 NV_STATUS (*__memmgrStatePreInitLocked__)(OBJGPU *, struct MemoryManager *); 478 NV_STATUS (*__memmgrStateInitLocked__)(OBJGPU *, struct MemoryManager *); 479 NV_STATUS (*__memmgrStateLoad__)(OBJGPU *, struct MemoryManager *, NvU32); 480 NV_STATUS (*__memmgrStatePostLoad__)(OBJGPU *, struct MemoryManager *, NvU32); 481 NV_STATUS (*__memmgrStatePreUnload__)(OBJGPU *, struct MemoryManager *, NvU32); 482 NV_STATUS (*__memmgrStateUnload__)(OBJGPU *, struct MemoryManager *, NvU32); 483 void (*__memmgrStateDestroy__)(OBJGPU *, struct MemoryManager *); 484 NV_STATUS (*__memmgrMemUtilsSec2CtxInit__)(OBJGPU *, struct MemoryManager *, OBJCHANNEL *); 485 NvBool (*__memmgrMemUtilsCheckMemoryFastScrubEnable__)(OBJGPU *, struct MemoryManager *, NvU32, NvBool, RmPhysAddr, NvU32, NV_ADDRESS_SPACE); 486 NV_STATUS (*__memmgrAllocDetermineAlignment__)(OBJGPU *, struct MemoryManager *, NvU64 *, NvU64 *, NvU64, NvU32, NvU32, NvU32, NvU64); 487 NvU64 (*__memmgrGetMaxContextSize__)(OBJGPU *, struct MemoryManager *); 488 void (*__memmgrScrubRegistryOverrides__)(OBJGPU *, struct MemoryManager *); 489 NvU32 (*__memmgrGetPteKindBl__)(OBJGPU *, struct MemoryManager *); 490 NvU32 (*__memmgrGetPteKindPitch__)(OBJGPU *, struct MemoryManager *); 491 NvU32 (*__memmgrChooseKindCompressC__)(OBJGPU *, struct MemoryManager *, FB_ALLOC_PAGE_FORMAT *); 492 NV_STATUS (*__memmgrGetFlaKind__)(OBJGPU *, struct MemoryManager *, NvU32 *); 493 NvBool (*__memmgrIsApertureSupportedByFla__)(OBJGPU *, struct MemoryManager *, NV_ADDRESS_SPACE); 494 NvU32 (*__memmgrDetermineComptag__)(OBJGPU *, struct MemoryManager *, RmPhysAddr); 495 NV_STATUS (*__memmgrCheckReservedMemorySize__)(OBJGPU *, struct MemoryManager *); 496 NV_STATUS (*__memmgrReadMmuLock__)(OBJGPU *, struct MemoryManager *, NvBool *, NvU64 *, NvU64 *); 497 NV_STATUS (*__memmgrBlockMemLockedMemory__)(OBJGPU *, struct MemoryManager *); 498 NV_STATUS (*__memmgrInsertUnprotectedRegionAtBottomOfFb__)(OBJGPU *, struct MemoryManager *, NvU64 *); 499 void (*__memmgrGetDisablePlcKind__)(struct MemoryManager *, NvU32 *); 500 void (*__memmgrEnableDynamicPageOfflining__)(OBJGPU *, struct MemoryManager *); 501 NV_STATUS (*__memmgrGetBlackListPages__)(OBJGPU *, struct MemoryManager *, BLACKLIST_ADDRESS *, NvU32 *); 502 NV_STATUS (*__memmgrStatePreLoad__)(POBJGPU, struct MemoryManager *, NvU32); 503 NV_STATUS (*__memmgrStatePostUnload__)(POBJGPU, struct MemoryManager *, NvU32); 504 NV_STATUS (*__memmgrStateInitUnlocked__)(POBJGPU, struct MemoryManager *); 505 void (*__memmgrInitMissing__)(POBJGPU, struct MemoryManager *); 506 NV_STATUS (*__memmgrStatePreInitUnlocked__)(POBJGPU, struct MemoryManager *); 507 NvBool (*__memmgrIsPresent__)(POBJGPU, struct MemoryManager *); 508 NvBool bFbsrWddmModeEnabled; 509 NvBool bFbRegionsSupported; 510 NvBool bPmaSupportedOnPlatform; 511 NvBool bPmaEnabled; 512 NvBool bPmaInitialized; 513 NvBool bPmaForcePersistence; 514 NvBool bPmaAddrTree; 515 NvBool bClientPageTablesPmaManaged; 516 NvBool bScanoutSysmem; 517 NvBool bMixedDensityFbp; 518 NvBool bPreferSlowRegion; 519 NvBool bPersistentStandbyBuffer; 520 NvBool bEnableFbsrPagedDma; 521 NvBool bDisallowSplitLowerMemory; 522 NvBool bIgnoreUpperMemory; 523 NvBool bSmallPageCompression; 524 NvBool bSysmemCompressionSupportDef; 525 NvBool bBug1698088IncreaseRmReserveMemoryWar; 526 NvBool bBug2301372IncreaseRmReserveMemoryWar; 527 NvBool bEnableFbsrFileMode; 528 NvBool bEnableDynamicPageOfflining; 529 NvBool bVgpuPmaSupport; 530 NvBool bScrubChannelSetupInProgress; 531 NvBool bBug3922001DisableCtxBufOnSim; 532 NvBool bEnableDynamicGranularityPageArrays; 533 NvBool bAllowNoncontiguousAllocation; 534 NvBool bLocalEgmSupported; 535 NvBool bLocalEgmEnabled; 536 NvU32 localEgmPeerId; 537 NvS32 localEgmNodeId; 538 NvU64 localEgmBasePhysAddr; 539 NvU64 localEgmSize; 540 NvBool bEccInterleavedVidmemScrub; 541 NvBool bScrubberInitialized; 542 NvBool bAllowSysmemHugePages; 543 NvBool bEccScrubOverride; 544 NvU64 sysmemPageSize; 545 struct Heap *pHeap; 546 NvBool bScrubOnFreeEnabled; 547 NvBool bFastScrubberEnabled; 548 NvBool bDisableAsyncScrubforMods; 549 NvBool bUseVasForCeMemoryOps; 550 NvBool bRmExecutingEccScrub; 551 NvBool bBug1441072EccScrubWar; 552 NvU64 heapStartOffset; 553 NvU64 rsvdMemoryBase; 554 NvU32 rsvdMemorySize; 555 struct CeUtils *pCeUtils; 556 struct CeUtils *pCeUtilsSuspended; 557 NvBool bDisableGlobalCeUtils; 558 OBJSCRUB eccScrubberState; 559 struct __nvoc_inner_struc_MemoryManager_1__ Ram; 560 NvU32 PteKindOverride; 561 NvU64 scratchDwordOffset; 562 NvU32 zbcSurfaces; 563 NvU64 overrideInitHeapMin; 564 NvU64 overrideHeapMax; 565 NvU64 rsvdMemorySizeIncrement; 566 struct OBJFBSR *pFbsr[8]; 567 struct OBJFBSR *pActiveFbsr; 568 NvU32 fbsrStartMode; 569 NvU32 fixedFbsrModesMask; 570 MEMORY_DESCRIPTOR *fbsrReservedRanges[6]; 571 PFB_MEM_NODE pMemHeadNode; 572 PFB_MEM_NODE pMemTailNode; 573 struct RM_POOL_ALLOC_MEM_RESERVE_INFO *pPageLevelReserve; 574 struct MIG_MEMORY_PARTITIONING_INFO MIGMemoryPartitioningInfo; 575 NV_FB_RSVD_BLOCK_LOG_INFO rsvdBlockInfo; 576 NvHandle hClient; 577 NvHandle hDevice; 578 NvHandle hSubdevice; 579 NvHandle hThirdPartyP2P; 580 NvBool bMonitoredFenceSupported; 581 NvBool b64BitSemaphoresSupported; 582 NvBool bGenericKindSupport; 583 NvBool bLocalizedMemPoolEnabled; 584 }; 585 586 #ifndef __NVOC_CLASS_MemoryManager_TYPEDEF__ 587 #define __NVOC_CLASS_MemoryManager_TYPEDEF__ 588 typedef struct MemoryManager MemoryManager; 589 #endif /* __NVOC_CLASS_MemoryManager_TYPEDEF__ */ 590 591 #ifndef __nvoc_class_id_MemoryManager 592 #define __nvoc_class_id_MemoryManager 0x22ad47 593 #endif /* __nvoc_class_id_MemoryManager */ 594 595 extern const struct NVOC_CLASS_DEF __nvoc_class_def_MemoryManager; 596 597 #define __staticCast_MemoryManager(pThis) \ 598 ((pThis)->__nvoc_pbase_MemoryManager) 599 600 #ifdef __nvoc_mem_mgr_h_disabled 601 #define __dynamicCast_MemoryManager(pThis) ((MemoryManager*)NULL) 602 #else //__nvoc_mem_mgr_h_disabled 603 #define __dynamicCast_MemoryManager(pThis) \ 604 ((MemoryManager*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(MemoryManager))) 605 #endif //__nvoc_mem_mgr_h_disabled 606 607 #define PDB_PROP_MEMMGR_IS_MISSING_BASE_CAST __nvoc_base_OBJENGSTATE. 608 #define PDB_PROP_MEMMGR_IS_MISSING_BASE_NAME PDB_PROP_ENGSTATE_IS_MISSING 609 610 NV_STATUS __nvoc_objCreateDynamic_MemoryManager(MemoryManager**, Dynamic*, NvU32, va_list); 611 612 NV_STATUS __nvoc_objCreate_MemoryManager(MemoryManager**, Dynamic*, NvU32); 613 #define __objCreate_MemoryManager(ppNewObj, pParent, createFlags) \ 614 __nvoc_objCreate_MemoryManager((ppNewObj), staticCast((pParent), Dynamic), (createFlags)) 615 616 #define memmgrConstructEngine(pGpu, pMemoryManager, arg0) memmgrConstructEngine_DISPATCH(pGpu, pMemoryManager, arg0) 617 #define memmgrStatePreInitLocked(pGpu, pMemoryManager) memmgrStatePreInitLocked_DISPATCH(pGpu, pMemoryManager) 618 #define memmgrStateInitLocked(pGpu, pMemoryManager) memmgrStateInitLocked_DISPATCH(pGpu, pMemoryManager) 619 #define memmgrStateLoad(pGpu, pMemoryManager, arg0) memmgrStateLoad_DISPATCH(pGpu, pMemoryManager, arg0) 620 #define memmgrStatePostLoad(pGpu, pMemoryManager, arg0) memmgrStatePostLoad_DISPATCH(pGpu, pMemoryManager, arg0) 621 #define memmgrStatePreUnload(pGpu, pMemoryManager, arg0) memmgrStatePreUnload_DISPATCH(pGpu, pMemoryManager, arg0) 622 #define memmgrStateUnload(pGpu, pMemoryManager, arg0) memmgrStateUnload_DISPATCH(pGpu, pMemoryManager, arg0) 623 #define memmgrStateDestroy(pGpu, pMemoryManager) memmgrStateDestroy_DISPATCH(pGpu, pMemoryManager) 624 #define memmgrMemUtilsSec2CtxInit(pGpu, pMemoryManager, arg0) memmgrMemUtilsSec2CtxInit_DISPATCH(pGpu, pMemoryManager, arg0) 625 #define memmgrMemUtilsSec2CtxInit_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsSec2CtxInit_DISPATCH(pGpu, pMemoryManager, arg0) 626 #define memmgrMemUtilsCheckMemoryFastScrubEnable(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) memmgrMemUtilsCheckMemoryFastScrubEnable_DISPATCH(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) 627 #define memmgrMemUtilsCheckMemoryFastScrubEnable_HAL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) memmgrMemUtilsCheckMemoryFastScrubEnable_DISPATCH(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) 628 #define memmgrAllocDetermineAlignment(pGpu, pMemoryManager, pMemSize, pAlign, alignPad, allocFlags, retAttr, retAttr2, hwAlignment) memmgrAllocDetermineAlignment_DISPATCH(pGpu, pMemoryManager, pMemSize, pAlign, alignPad, allocFlags, retAttr, retAttr2, hwAlignment) 629 #define memmgrAllocDetermineAlignment_HAL(pGpu, pMemoryManager, pMemSize, pAlign, alignPad, allocFlags, retAttr, retAttr2, hwAlignment) memmgrAllocDetermineAlignment_DISPATCH(pGpu, pMemoryManager, pMemSize, pAlign, alignPad, allocFlags, retAttr, retAttr2, hwAlignment) 630 #define memmgrGetMaxContextSize(pGpu, pMemoryManager) memmgrGetMaxContextSize_DISPATCH(pGpu, pMemoryManager) 631 #define memmgrGetMaxContextSize_HAL(pGpu, pMemoryManager) memmgrGetMaxContextSize_DISPATCH(pGpu, pMemoryManager) 632 #define memmgrScrubRegistryOverrides(pGpu, pMemoryManager) memmgrScrubRegistryOverrides_DISPATCH(pGpu, pMemoryManager) 633 #define memmgrScrubRegistryOverrides_HAL(pGpu, pMemoryManager) memmgrScrubRegistryOverrides_DISPATCH(pGpu, pMemoryManager) 634 #define memmgrGetPteKindBl(pGpu, pMemoryManager) memmgrGetPteKindBl_DISPATCH(pGpu, pMemoryManager) 635 #define memmgrGetPteKindBl_HAL(pGpu, pMemoryManager) memmgrGetPteKindBl_DISPATCH(pGpu, pMemoryManager) 636 #define memmgrGetPteKindPitch(pGpu, pMemoryManager) memmgrGetPteKindPitch_DISPATCH(pGpu, pMemoryManager) 637 #define memmgrGetPteKindPitch_HAL(pGpu, pMemoryManager) memmgrGetPteKindPitch_DISPATCH(pGpu, pMemoryManager) 638 #define memmgrChooseKindCompressC(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressC_DISPATCH(pGpu, pMemoryManager, arg0) 639 #define memmgrChooseKindCompressC_HAL(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressC_DISPATCH(pGpu, pMemoryManager, arg0) 640 #define memmgrGetFlaKind(pGpu, pMemoryManager, arg0) memmgrGetFlaKind_DISPATCH(pGpu, pMemoryManager, arg0) 641 #define memmgrGetFlaKind_HAL(pGpu, pMemoryManager, arg0) memmgrGetFlaKind_DISPATCH(pGpu, pMemoryManager, arg0) 642 #define memmgrIsApertureSupportedByFla(pGpu, pMemoryManager, arg0) memmgrIsApertureSupportedByFla_DISPATCH(pGpu, pMemoryManager, arg0) 643 #define memmgrIsApertureSupportedByFla_HAL(pGpu, pMemoryManager, arg0) memmgrIsApertureSupportedByFla_DISPATCH(pGpu, pMemoryManager, arg0) 644 #define memmgrDetermineComptag(pGpu, pMemoryManager, arg0) memmgrDetermineComptag_DISPATCH(pGpu, pMemoryManager, arg0) 645 #define memmgrDetermineComptag_HAL(pGpu, pMemoryManager, arg0) memmgrDetermineComptag_DISPATCH(pGpu, pMemoryManager, arg0) 646 #define memmgrCheckReservedMemorySize(pGpu, pMemoryManager) memmgrCheckReservedMemorySize_DISPATCH(pGpu, pMemoryManager) 647 #define memmgrCheckReservedMemorySize_HAL(pGpu, pMemoryManager) memmgrCheckReservedMemorySize_DISPATCH(pGpu, pMemoryManager) 648 #define memmgrReadMmuLock(pGpu, pMemoryManager, pbIsValid, pMmuLockLo, pMmuLockHi) memmgrReadMmuLock_DISPATCH(pGpu, pMemoryManager, pbIsValid, pMmuLockLo, pMmuLockHi) 649 #define memmgrReadMmuLock_HAL(pGpu, pMemoryManager, pbIsValid, pMmuLockLo, pMmuLockHi) memmgrReadMmuLock_DISPATCH(pGpu, pMemoryManager, pbIsValid, pMmuLockLo, pMmuLockHi) 650 #define memmgrBlockMemLockedMemory(pGpu, pMemoryManager) memmgrBlockMemLockedMemory_DISPATCH(pGpu, pMemoryManager) 651 #define memmgrBlockMemLockedMemory_HAL(pGpu, pMemoryManager) memmgrBlockMemLockedMemory_DISPATCH(pGpu, pMemoryManager) 652 #define memmgrInsertUnprotectedRegionAtBottomOfFb(pGpu, pMemoryManager, pSize) memmgrInsertUnprotectedRegionAtBottomOfFb_DISPATCH(pGpu, pMemoryManager, pSize) 653 #define memmgrInsertUnprotectedRegionAtBottomOfFb_HAL(pGpu, pMemoryManager, pSize) memmgrInsertUnprotectedRegionAtBottomOfFb_DISPATCH(pGpu, pMemoryManager, pSize) 654 #define memmgrGetDisablePlcKind(pMemoryManager, pteKind) memmgrGetDisablePlcKind_DISPATCH(pMemoryManager, pteKind) 655 #define memmgrGetDisablePlcKind_HAL(pMemoryManager, pteKind) memmgrGetDisablePlcKind_DISPATCH(pMemoryManager, pteKind) 656 #define memmgrEnableDynamicPageOfflining(pGpu, pMemoryManager) memmgrEnableDynamicPageOfflining_DISPATCH(pGpu, pMemoryManager) 657 #define memmgrEnableDynamicPageOfflining_HAL(pGpu, pMemoryManager) memmgrEnableDynamicPageOfflining_DISPATCH(pGpu, pMemoryManager) 658 #define memmgrGetBlackListPages(pGpu, pMemoryManager, pBlAddrs, pCount) memmgrGetBlackListPages_DISPATCH(pGpu, pMemoryManager, pBlAddrs, pCount) 659 #define memmgrGetBlackListPages_HAL(pGpu, pMemoryManager, pBlAddrs, pCount) memmgrGetBlackListPages_DISPATCH(pGpu, pMemoryManager, pBlAddrs, pCount) 660 #define memmgrStatePreLoad(pGpu, pEngstate, arg0) memmgrStatePreLoad_DISPATCH(pGpu, pEngstate, arg0) 661 #define memmgrStatePostUnload(pGpu, pEngstate, arg0) memmgrStatePostUnload_DISPATCH(pGpu, pEngstate, arg0) 662 #define memmgrStateInitUnlocked(pGpu, pEngstate) memmgrStateInitUnlocked_DISPATCH(pGpu, pEngstate) 663 #define memmgrInitMissing(pGpu, pEngstate) memmgrInitMissing_DISPATCH(pGpu, pEngstate) 664 #define memmgrStatePreInitUnlocked(pGpu, pEngstate) memmgrStatePreInitUnlocked_DISPATCH(pGpu, pEngstate) 665 #define memmgrIsPresent(pGpu, pEngstate) memmgrIsPresent_DISPATCH(pGpu, pEngstate) 666 NV_STATUS memmgrSavePowerMgmtState_KERNEL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 667 668 669 #ifdef __nvoc_mem_mgr_h_disabled 670 static inline NV_STATUS memmgrSavePowerMgmtState(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 671 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 672 return NV_ERR_NOT_SUPPORTED; 673 } 674 #else //__nvoc_mem_mgr_h_disabled 675 #define memmgrSavePowerMgmtState(pGpu, pMemoryManager) memmgrSavePowerMgmtState_KERNEL(pGpu, pMemoryManager) 676 #endif //__nvoc_mem_mgr_h_disabled 677 678 #define memmgrSavePowerMgmtState_HAL(pGpu, pMemoryManager) memmgrSavePowerMgmtState(pGpu, pMemoryManager) 679 680 NV_STATUS memmgrRestorePowerMgmtState_KERNEL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 681 682 683 #ifdef __nvoc_mem_mgr_h_disabled 684 static inline NV_STATUS memmgrRestorePowerMgmtState(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 685 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 686 return NV_ERR_NOT_SUPPORTED; 687 } 688 #else //__nvoc_mem_mgr_h_disabled 689 #define memmgrRestorePowerMgmtState(pGpu, pMemoryManager) memmgrRestorePowerMgmtState_KERNEL(pGpu, pMemoryManager) 690 #endif //__nvoc_mem_mgr_h_disabled 691 692 #define memmgrRestorePowerMgmtState_HAL(pGpu, pMemoryManager) memmgrRestorePowerMgmtState(pGpu, pMemoryManager) 693 694 NvU64 memmgrDeterminePageSize_IMPL(struct MemoryManager *pMemoryManager, NvHandle hClient, NvU64 memSize, NvU32 memFormat, NvU32 pageFormatFlags, NvU32 *pRetAttr, NvU32 *pRetAttr2); 695 696 697 #ifdef __nvoc_mem_mgr_h_disabled 698 static inline NvU64 memmgrDeterminePageSize(struct MemoryManager *pMemoryManager, NvHandle hClient, NvU64 memSize, NvU32 memFormat, NvU32 pageFormatFlags, NvU32 *pRetAttr, NvU32 *pRetAttr2) { 699 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 700 return 0; 701 } 702 #else //__nvoc_mem_mgr_h_disabled 703 #define memmgrDeterminePageSize(pMemoryManager, hClient, memSize, memFormat, pageFormatFlags, pRetAttr, pRetAttr2) memmgrDeterminePageSize_IMPL(pMemoryManager, hClient, memSize, memFormat, pageFormatFlags, pRetAttr, pRetAttr2) 704 #endif //__nvoc_mem_mgr_h_disabled 705 706 #define memmgrDeterminePageSize_HAL(pMemoryManager, hClient, memSize, memFormat, pageFormatFlags, pRetAttr, pRetAttr2) memmgrDeterminePageSize(pMemoryManager, hClient, memSize, memFormat, pageFormatFlags, pRetAttr, pRetAttr2) 707 708 static inline NV_STATUS memmgrReserveConsoleRegion_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_REGION_DESCRIPTOR *arg0) { 709 return NV_OK; 710 } 711 712 713 #ifdef __nvoc_mem_mgr_h_disabled 714 static inline NV_STATUS memmgrReserveConsoleRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_REGION_DESCRIPTOR *arg0) { 715 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 716 return NV_ERR_NOT_SUPPORTED; 717 } 718 #else //__nvoc_mem_mgr_h_disabled 719 #define memmgrReserveConsoleRegion(pGpu, pMemoryManager, arg0) memmgrReserveConsoleRegion_56cd7a(pGpu, pMemoryManager, arg0) 720 #endif //__nvoc_mem_mgr_h_disabled 721 722 #define memmgrReserveConsoleRegion_HAL(pGpu, pMemoryManager, arg0) memmgrReserveConsoleRegion(pGpu, pMemoryManager, arg0) 723 724 NV_STATUS memmgrAllocateConsoleRegion_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_REGION_DESCRIPTOR *arg0); 725 726 727 #ifdef __nvoc_mem_mgr_h_disabled 728 static inline NV_STATUS memmgrAllocateConsoleRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_REGION_DESCRIPTOR *arg0) { 729 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 730 return NV_ERR_NOT_SUPPORTED; 731 } 732 #else //__nvoc_mem_mgr_h_disabled 733 #define memmgrAllocateConsoleRegion(pGpu, pMemoryManager, arg0) memmgrAllocateConsoleRegion_IMPL(pGpu, pMemoryManager, arg0) 734 #endif //__nvoc_mem_mgr_h_disabled 735 736 #define memmgrAllocateConsoleRegion_HAL(pGpu, pMemoryManager, arg0) memmgrAllocateConsoleRegion(pGpu, pMemoryManager, arg0) 737 738 NV_STATUS memmgrGetKindComprForGpu_KERNEL(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *arg0, OBJGPU *pGpu, NvU64 offset, NvU32 *kind, COMPR_INFO *pComprInfo); 739 740 741 #ifdef __nvoc_mem_mgr_h_disabled 742 static inline NV_STATUS memmgrGetKindComprForGpu(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *arg0, OBJGPU *pGpu, NvU64 offset, NvU32 *kind, COMPR_INFO *pComprInfo) { 743 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 744 return NV_ERR_NOT_SUPPORTED; 745 } 746 #else //__nvoc_mem_mgr_h_disabled 747 #define memmgrGetKindComprForGpu(pMemoryManager, arg0, pGpu, offset, kind, pComprInfo) memmgrGetKindComprForGpu_KERNEL(pMemoryManager, arg0, pGpu, offset, kind, pComprInfo) 748 #endif //__nvoc_mem_mgr_h_disabled 749 750 #define memmgrGetKindComprForGpu_HAL(pMemoryManager, arg0, pGpu, offset, kind, pComprInfo) memmgrGetKindComprForGpu(pMemoryManager, arg0, pGpu, offset, kind, pComprInfo) 751 752 static inline NV_STATUS memmgrScrubInit_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 753 return NV_OK; 754 } 755 756 757 #ifdef __nvoc_mem_mgr_h_disabled 758 static inline NV_STATUS memmgrScrubInit(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 759 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 760 return NV_ERR_NOT_SUPPORTED; 761 } 762 #else //__nvoc_mem_mgr_h_disabled 763 #define memmgrScrubInit(pGpu, pMemoryManager) memmgrScrubInit_56cd7a(pGpu, pMemoryManager) 764 #endif //__nvoc_mem_mgr_h_disabled 765 766 #define memmgrScrubInit_HAL(pGpu, pMemoryManager) memmgrScrubInit(pGpu, pMemoryManager) 767 768 NV_STATUS memmgrScrubHandlePostSchedulingEnable_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 769 770 771 #ifdef __nvoc_mem_mgr_h_disabled 772 static inline NV_STATUS memmgrScrubHandlePostSchedulingEnable(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 773 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 774 return NV_ERR_NOT_SUPPORTED; 775 } 776 #else //__nvoc_mem_mgr_h_disabled 777 #define memmgrScrubHandlePostSchedulingEnable(pGpu, pMemoryManager) memmgrScrubHandlePostSchedulingEnable_GP100(pGpu, pMemoryManager) 778 #endif //__nvoc_mem_mgr_h_disabled 779 780 #define memmgrScrubHandlePostSchedulingEnable_HAL(pGpu, pMemoryManager) memmgrScrubHandlePostSchedulingEnable(pGpu, pMemoryManager) 781 782 static inline void memmgrGetScrubState_f2d351(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0, NvU64 *arg1, NvBool *arg2) { 783 NV_ASSERT_PRECOMP(0); 784 } 785 786 787 #ifdef __nvoc_mem_mgr_h_disabled 788 static inline void memmgrGetScrubState(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0, NvU64 *arg1, NvBool *arg2) { 789 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 790 } 791 #else //__nvoc_mem_mgr_h_disabled 792 #define memmgrGetScrubState(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrGetScrubState_f2d351(pGpu, pMemoryManager, arg0, arg1, arg2) 793 #endif //__nvoc_mem_mgr_h_disabled 794 795 #define memmgrGetScrubState_HAL(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrGetScrubState(pGpu, pMemoryManager, arg0, arg1, arg2) 796 797 static inline void memmgrScrubInternalRegions_b3696a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 798 return; 799 } 800 801 802 #ifdef __nvoc_mem_mgr_h_disabled 803 static inline void memmgrScrubInternalRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 804 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 805 } 806 #else //__nvoc_mem_mgr_h_disabled 807 #define memmgrScrubInternalRegions(pGpu, pMemoryManager) memmgrScrubInternalRegions_b3696a(pGpu, pMemoryManager) 808 #endif //__nvoc_mem_mgr_h_disabled 809 810 #define memmgrScrubInternalRegions_HAL(pGpu, pMemoryManager) memmgrScrubInternalRegions(pGpu, pMemoryManager) 811 812 static inline NvBool memmgrEccScrubInProgress_491d52(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 813 return ((NvBool)(0 != 0)); 814 } 815 816 NvBool memmgrEccScrubInProgress_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 817 818 819 #ifdef __nvoc_mem_mgr_h_disabled 820 static inline NvBool memmgrEccScrubInProgress(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 821 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 822 return NV_FALSE; 823 } 824 #else //__nvoc_mem_mgr_h_disabled 825 #define memmgrEccScrubInProgress(pGpu, pMemoryManager) memmgrEccScrubInProgress_491d52(pGpu, pMemoryManager) 826 #endif //__nvoc_mem_mgr_h_disabled 827 828 #define memmgrEccScrubInProgress_HAL(pGpu, pMemoryManager) memmgrEccScrubInProgress(pGpu, pMemoryManager) 829 830 static inline void memmgrAsyncScrubRegion_f2d351(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0, NvU64 arg1) { 831 NV_ASSERT_PRECOMP(0); 832 } 833 834 835 #ifdef __nvoc_mem_mgr_h_disabled 836 static inline void memmgrAsyncScrubRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0, NvU64 arg1) { 837 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 838 } 839 #else //__nvoc_mem_mgr_h_disabled 840 #define memmgrAsyncScrubRegion(pGpu, pMemoryManager, arg0, arg1) memmgrAsyncScrubRegion_f2d351(pGpu, pMemoryManager, arg0, arg1) 841 #endif //__nvoc_mem_mgr_h_disabled 842 843 #define memmgrAsyncScrubRegion_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrAsyncScrubRegion(pGpu, pMemoryManager, arg0, arg1) 844 845 NV_STATUS memmgrScrubHandlePreSchedulingDisable_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 846 847 848 #ifdef __nvoc_mem_mgr_h_disabled 849 static inline NV_STATUS memmgrScrubHandlePreSchedulingDisable(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 850 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 851 return NV_ERR_NOT_SUPPORTED; 852 } 853 #else //__nvoc_mem_mgr_h_disabled 854 #define memmgrScrubHandlePreSchedulingDisable(pGpu, pMemoryManager) memmgrScrubHandlePreSchedulingDisable_GP100(pGpu, pMemoryManager) 855 #endif //__nvoc_mem_mgr_h_disabled 856 857 #define memmgrScrubHandlePreSchedulingDisable_HAL(pGpu, pMemoryManager) memmgrScrubHandlePreSchedulingDisable(pGpu, pMemoryManager) 858 859 static inline void memmgrScrubDestroy_b3696a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 860 return; 861 } 862 863 864 #ifdef __nvoc_mem_mgr_h_disabled 865 static inline void memmgrScrubDestroy(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 866 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 867 } 868 #else //__nvoc_mem_mgr_h_disabled 869 #define memmgrScrubDestroy(pGpu, pMemoryManager) memmgrScrubDestroy_b3696a(pGpu, pMemoryManager) 870 #endif //__nvoc_mem_mgr_h_disabled 871 872 #define memmgrScrubDestroy_HAL(pGpu, pMemoryManager) memmgrScrubDestroy(pGpu, pMemoryManager) 873 874 static inline void memmgrScrubMemory_b3696a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0, NvU64 arg1) { 875 return; 876 } 877 878 void memmgrScrubMemory_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0, NvU64 arg1); 879 880 881 #ifdef __nvoc_mem_mgr_h_disabled 882 static inline void memmgrScrubMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0, NvU64 arg1) { 883 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 884 } 885 #else //__nvoc_mem_mgr_h_disabled 886 #define memmgrScrubMemory(pGpu, pMemoryManager, arg0, arg1) memmgrScrubMemory_b3696a(pGpu, pMemoryManager, arg0, arg1) 887 #endif //__nvoc_mem_mgr_h_disabled 888 889 #define memmgrScrubMemory_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrScrubMemory(pGpu, pMemoryManager, arg0, arg1) 890 891 NV_STATUS memmgrMemUtilsMemSetBlocking_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, RmPhysAddr arg1, NvU64 arg2); 892 893 894 #ifdef __nvoc_mem_mgr_h_disabled 895 static inline NV_STATUS memmgrMemUtilsMemSetBlocking(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, RmPhysAddr arg1, NvU64 arg2) { 896 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 897 return NV_ERR_NOT_SUPPORTED; 898 } 899 #else //__nvoc_mem_mgr_h_disabled 900 #define memmgrMemUtilsMemSetBlocking(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrMemUtilsMemSetBlocking_GM107(pGpu, pMemoryManager, arg0, arg1, arg2) 901 #endif //__nvoc_mem_mgr_h_disabled 902 903 #define memmgrMemUtilsMemSetBlocking_HAL(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrMemUtilsMemSetBlocking(pGpu, pMemoryManager, arg0, arg1, arg2) 904 905 NV_STATUS memmgrMemUtilsMemSet_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, RmPhysAddr arg1, NvU64 arg2, NvU32 arg3, NvU32 *arg4); 906 907 908 #ifdef __nvoc_mem_mgr_h_disabled 909 static inline NV_STATUS memmgrMemUtilsMemSet(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, RmPhysAddr arg1, NvU64 arg2, NvU32 arg3, NvU32 *arg4) { 910 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 911 return NV_ERR_NOT_SUPPORTED; 912 } 913 #else //__nvoc_mem_mgr_h_disabled 914 #define memmgrMemUtilsMemSet(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) memmgrMemUtilsMemSet_GM107(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) 915 #endif //__nvoc_mem_mgr_h_disabled 916 917 #define memmgrMemUtilsMemSet_HAL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) memmgrMemUtilsMemSet(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4) 918 919 NV_STATUS memmgrMemUtilsAllocateEccScrubber_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 920 921 922 #ifdef __nvoc_mem_mgr_h_disabled 923 static inline NV_STATUS memmgrMemUtilsAllocateEccScrubber(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 924 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 925 return NV_ERR_NOT_SUPPORTED; 926 } 927 #else //__nvoc_mem_mgr_h_disabled 928 #define memmgrMemUtilsAllocateEccScrubber(pGpu, pMemoryManager, arg0) memmgrMemUtilsAllocateEccScrubber_GM107(pGpu, pMemoryManager, arg0) 929 #endif //__nvoc_mem_mgr_h_disabled 930 931 #define memmgrMemUtilsAllocateEccScrubber_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsAllocateEccScrubber(pGpu, pMemoryManager, arg0) 932 933 NV_STATUS memmgrMemUtilsAllocateEccAllocScrubber_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 934 935 936 #ifdef __nvoc_mem_mgr_h_disabled 937 static inline NV_STATUS memmgrMemUtilsAllocateEccAllocScrubber(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 938 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 939 return NV_ERR_NOT_SUPPORTED; 940 } 941 #else //__nvoc_mem_mgr_h_disabled 942 #define memmgrMemUtilsAllocateEccAllocScrubber(pGpu, pMemoryManager, arg0) memmgrMemUtilsAllocateEccAllocScrubber_GM107(pGpu, pMemoryManager, arg0) 943 #endif //__nvoc_mem_mgr_h_disabled 944 945 #define memmgrMemUtilsAllocateEccAllocScrubber_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsAllocateEccAllocScrubber(pGpu, pMemoryManager, arg0) 946 947 NV_STATUS memmgrMemUtilsChannelInitialize_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 948 949 950 #ifdef __nvoc_mem_mgr_h_disabled 951 static inline NV_STATUS memmgrMemUtilsChannelInitialize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 952 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 953 return NV_ERR_NOT_SUPPORTED; 954 } 955 #else //__nvoc_mem_mgr_h_disabled 956 #define memmgrMemUtilsChannelInitialize(pGpu, pMemoryManager, arg0) memmgrMemUtilsChannelInitialize_GM107(pGpu, pMemoryManager, arg0) 957 #endif //__nvoc_mem_mgr_h_disabled 958 959 #define memmgrMemUtilsChannelInitialize_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsChannelInitialize(pGpu, pMemoryManager, arg0) 960 961 NV_STATUS memmgrMemUtilsCopyEngineInitialize_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 962 963 964 #ifdef __nvoc_mem_mgr_h_disabled 965 static inline NV_STATUS memmgrMemUtilsCopyEngineInitialize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 966 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 967 return NV_ERR_NOT_SUPPORTED; 968 } 969 #else //__nvoc_mem_mgr_h_disabled 970 #define memmgrMemUtilsCopyEngineInitialize(pGpu, pMemoryManager, arg0) memmgrMemUtilsCopyEngineInitialize_GM107(pGpu, pMemoryManager, arg0) 971 #endif //__nvoc_mem_mgr_h_disabled 972 973 #define memmgrMemUtilsCopyEngineInitialize_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsCopyEngineInitialize(pGpu, pMemoryManager, arg0) 974 975 NV_STATUS memmgrMemUtilsGetCopyEngineClass_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *pClass); 976 977 978 #ifdef __nvoc_mem_mgr_h_disabled 979 static inline NV_STATUS memmgrMemUtilsGetCopyEngineClass(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *pClass) { 980 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 981 return NV_ERR_NOT_SUPPORTED; 982 } 983 #else //__nvoc_mem_mgr_h_disabled 984 #define memmgrMemUtilsGetCopyEngineClass(pGpu, pMemoryManager, pClass) memmgrMemUtilsGetCopyEngineClass_GM107(pGpu, pMemoryManager, pClass) 985 #endif //__nvoc_mem_mgr_h_disabled 986 987 #define memmgrMemUtilsGetCopyEngineClass_HAL(pGpu, pMemoryManager, pClass) memmgrMemUtilsGetCopyEngineClass(pGpu, pMemoryManager, pClass) 988 989 NV_STATUS memmgrMemUtilsCreateMemoryAlias_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 990 991 992 #ifdef __nvoc_mem_mgr_h_disabled 993 static inline NV_STATUS memmgrMemUtilsCreateMemoryAlias(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 994 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 995 return NV_ERR_NOT_SUPPORTED; 996 } 997 #else //__nvoc_mem_mgr_h_disabled 998 #define memmgrMemUtilsCreateMemoryAlias(pGpu, pMemoryManager, arg0) memmgrMemUtilsCreateMemoryAlias_GM107(pGpu, pMemoryManager, arg0) 999 #endif //__nvoc_mem_mgr_h_disabled 1000 1001 #define memmgrMemUtilsCreateMemoryAlias_HAL(pGpu, pMemoryManager, arg0) memmgrMemUtilsCreateMemoryAlias(pGpu, pMemoryManager, arg0) 1002 1003 NV_STATUS memmgrAllocHal_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo); 1004 1005 1006 #ifdef __nvoc_mem_mgr_h_disabled 1007 static inline NV_STATUS memmgrAllocHal(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo) { 1008 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1009 return NV_ERR_NOT_SUPPORTED; 1010 } 1011 #else //__nvoc_mem_mgr_h_disabled 1012 #define memmgrAllocHal(pGpu, pMemoryManager, pFbAllocInfo) memmgrAllocHal_GM107(pGpu, pMemoryManager, pFbAllocInfo) 1013 #endif //__nvoc_mem_mgr_h_disabled 1014 1015 #define memmgrAllocHal_HAL(pGpu, pMemoryManager, pFbAllocInfo) memmgrAllocHal(pGpu, pMemoryManager, pFbAllocInfo) 1016 1017 NV_STATUS memmgrFreeHal_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo, PRMTIMEOUT pTimeout); 1018 1019 1020 #ifdef __nvoc_mem_mgr_h_disabled 1021 static inline NV_STATUS memmgrFreeHal(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo, PRMTIMEOUT pTimeout) { 1022 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1023 return NV_ERR_NOT_SUPPORTED; 1024 } 1025 #else //__nvoc_mem_mgr_h_disabled 1026 #define memmgrFreeHal(pGpu, pMemoryManager, pFbAllocInfo, pTimeout) memmgrFreeHal_GM107(pGpu, pMemoryManager, pFbAllocInfo, pTimeout) 1027 #endif //__nvoc_mem_mgr_h_disabled 1028 1029 #define memmgrFreeHal_HAL(pGpu, pMemoryManager, pFbAllocInfo, pTimeout) memmgrFreeHal(pGpu, pMemoryManager, pFbAllocInfo, pTimeout) 1030 1031 static inline NV_STATUS memmgrUpdateSurfaceCompression_5baef9(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, Memory *arg0, NvBool arg1) { 1032 NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_NOT_SUPPORTED); 1033 } 1034 1035 1036 #ifdef __nvoc_mem_mgr_h_disabled 1037 static inline NV_STATUS memmgrUpdateSurfaceCompression(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, Memory *arg0, NvBool arg1) { 1038 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1039 return NV_ERR_NOT_SUPPORTED; 1040 } 1041 #else //__nvoc_mem_mgr_h_disabled 1042 #define memmgrUpdateSurfaceCompression(pGpu, pMemoryManager, arg0, arg1) memmgrUpdateSurfaceCompression_5baef9(pGpu, pMemoryManager, arg0, arg1) 1043 #endif //__nvoc_mem_mgr_h_disabled 1044 1045 #define memmgrUpdateSurfaceCompression_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrUpdateSurfaceCompression(pGpu, pMemoryManager, arg0, arg1) 1046 1047 NV_STATUS memmgrGetBankPlacementData_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *pBankPlacementLowData); 1048 1049 1050 #ifdef __nvoc_mem_mgr_h_disabled 1051 static inline NV_STATUS memmgrGetBankPlacementData(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *pBankPlacementLowData) { 1052 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1053 return NV_ERR_NOT_SUPPORTED; 1054 } 1055 #else //__nvoc_mem_mgr_h_disabled 1056 #define memmgrGetBankPlacementData(pGpu, pMemoryManager, pBankPlacementLowData) memmgrGetBankPlacementData_GM107(pGpu, pMemoryManager, pBankPlacementLowData) 1057 #endif //__nvoc_mem_mgr_h_disabled 1058 1059 #define memmgrGetBankPlacementData_HAL(pGpu, pMemoryManager, pBankPlacementLowData) memmgrGetBankPlacementData(pGpu, pMemoryManager, pBankPlacementLowData) 1060 1061 void memmgrDirtyForPmTest_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool partialDirty); 1062 1063 1064 #ifdef __nvoc_mem_mgr_h_disabled 1065 static inline void memmgrDirtyForPmTest(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool partialDirty) { 1066 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1067 } 1068 #else //__nvoc_mem_mgr_h_disabled 1069 #define memmgrDirtyForPmTest(pGpu, pMemoryManager, partialDirty) memmgrDirtyForPmTest_GM107(pGpu, pMemoryManager, partialDirty) 1070 #endif //__nvoc_mem_mgr_h_disabled 1071 1072 #define memmgrDirtyForPmTest_HAL(pGpu, pMemoryManager, partialDirty) memmgrDirtyForPmTest(pGpu, pMemoryManager, partialDirty) 1073 1074 NvU32 memmgrGetReservedHeapSizeMb_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1075 1076 1077 #ifdef __nvoc_mem_mgr_h_disabled 1078 static inline NvU32 memmgrGetReservedHeapSizeMb(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1079 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1080 return 0; 1081 } 1082 #else //__nvoc_mem_mgr_h_disabled 1083 #define memmgrGetReservedHeapSizeMb(pGpu, pMemoryManager) memmgrGetReservedHeapSizeMb_GM107(pGpu, pMemoryManager) 1084 #endif //__nvoc_mem_mgr_h_disabled 1085 1086 #define memmgrGetReservedHeapSizeMb_HAL(pGpu, pMemoryManager) memmgrGetReservedHeapSizeMb(pGpu, pMemoryManager) 1087 1088 NV_STATUS memmgrInitFbRegionsHal_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1089 1090 static inline NV_STATUS memmgrInitFbRegionsHal_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1091 return NV_OK; 1092 } 1093 1094 1095 #ifdef __nvoc_mem_mgr_h_disabled 1096 static inline NV_STATUS memmgrInitFbRegionsHal(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1097 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1098 return NV_ERR_NOT_SUPPORTED; 1099 } 1100 #else //__nvoc_mem_mgr_h_disabled 1101 #define memmgrInitFbRegionsHal(pGpu, pMemoryManager) memmgrInitFbRegionsHal_56cd7a(pGpu, pMemoryManager) 1102 #endif //__nvoc_mem_mgr_h_disabled 1103 1104 #define memmgrInitFbRegionsHal_HAL(pGpu, pMemoryManager) memmgrInitFbRegionsHal(pGpu, pMemoryManager) 1105 1106 void memmgrHandleSizeOverrides_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1107 1108 1109 #ifdef __nvoc_mem_mgr_h_disabled 1110 static inline void memmgrHandleSizeOverrides(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1111 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1112 } 1113 #else //__nvoc_mem_mgr_h_disabled 1114 #define memmgrHandleSizeOverrides(pGpu, pMemoryManager) memmgrHandleSizeOverrides_GP100(pGpu, pMemoryManager) 1115 #endif //__nvoc_mem_mgr_h_disabled 1116 1117 #define memmgrHandleSizeOverrides_HAL(pGpu, pMemoryManager) memmgrHandleSizeOverrides(pGpu, pMemoryManager) 1118 1119 NV_STATUS memmgrFinishHandleSizeOverrides_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1120 1121 1122 #ifdef __nvoc_mem_mgr_h_disabled 1123 static inline NV_STATUS memmgrFinishHandleSizeOverrides(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1124 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1125 return NV_ERR_NOT_SUPPORTED; 1126 } 1127 #else //__nvoc_mem_mgr_h_disabled 1128 #define memmgrFinishHandleSizeOverrides(pGpu, pMemoryManager) memmgrFinishHandleSizeOverrides_GP100(pGpu, pMemoryManager) 1129 #endif //__nvoc_mem_mgr_h_disabled 1130 1131 #define memmgrFinishHandleSizeOverrides_HAL(pGpu, pMemoryManager) memmgrFinishHandleSizeOverrides(pGpu, pMemoryManager) 1132 1133 NV_STATUS memmgrGetBAR1InfoForDevice_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Device *pDevice, PGETBAR1INFO bar1Info); 1134 1135 1136 #ifdef __nvoc_mem_mgr_h_disabled 1137 static inline NV_STATUS memmgrGetBAR1InfoForDevice(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Device *pDevice, PGETBAR1INFO bar1Info) { 1138 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1139 return NV_ERR_NOT_SUPPORTED; 1140 } 1141 #else //__nvoc_mem_mgr_h_disabled 1142 #define memmgrGetBAR1InfoForDevice(pGpu, pMemoryManager, pDevice, bar1Info) memmgrGetBAR1InfoForDevice_GM107(pGpu, pMemoryManager, pDevice, bar1Info) 1143 #endif //__nvoc_mem_mgr_h_disabled 1144 1145 #define memmgrGetBAR1InfoForDevice_HAL(pGpu, pMemoryManager, pDevice, bar1Info) memmgrGetBAR1InfoForDevice(pGpu, pMemoryManager, pDevice, bar1Info) 1146 1147 static inline NvU64 memmgrGetFbTaxSize_4a4dee(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1148 return 0; 1149 } 1150 1151 1152 #ifdef __nvoc_mem_mgr_h_disabled 1153 static inline NvU64 memmgrGetFbTaxSize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1154 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1155 return 0; 1156 } 1157 #else //__nvoc_mem_mgr_h_disabled 1158 #define memmgrGetFbTaxSize(pGpu, pMemoryManager) memmgrGetFbTaxSize_4a4dee(pGpu, pMemoryManager) 1159 #endif //__nvoc_mem_mgr_h_disabled 1160 1161 #define memmgrGetFbTaxSize_HAL(pGpu, pMemoryManager) memmgrGetFbTaxSize(pGpu, pMemoryManager) 1162 1163 NvU64 memmgrGetVgpuHostRmReservedFb_KERNEL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 vgpuTypeId); 1164 1165 NvU64 memmgrGetVgpuHostRmReservedFb_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 vgpuTypeId); 1166 1167 NvU64 memmgrGetVgpuHostRmReservedFb_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 vgpuTypeId); 1168 1169 1170 #ifdef __nvoc_mem_mgr_h_disabled 1171 static inline NvU64 memmgrGetVgpuHostRmReservedFb(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 vgpuTypeId) { 1172 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1173 return 0; 1174 } 1175 #else //__nvoc_mem_mgr_h_disabled 1176 #define memmgrGetVgpuHostRmReservedFb(pGpu, pMemoryManager, vgpuTypeId) memmgrGetVgpuHostRmReservedFb_KERNEL(pGpu, pMemoryManager, vgpuTypeId) 1177 #endif //__nvoc_mem_mgr_h_disabled 1178 1179 #define memmgrGetVgpuHostRmReservedFb_HAL(pGpu, pMemoryManager, vgpuTypeId) memmgrGetVgpuHostRmReservedFb(pGpu, pMemoryManager, vgpuTypeId) 1180 1181 NvU64 memmgrGetRsvdSizeForSr_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1182 1183 1184 #ifdef __nvoc_mem_mgr_h_disabled 1185 static inline NvU64 memmgrGetRsvdSizeForSr(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1186 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1187 return 0; 1188 } 1189 #else //__nvoc_mem_mgr_h_disabled 1190 #define memmgrGetRsvdSizeForSr(pGpu, pMemoryManager) memmgrGetRsvdSizeForSr_GM107(pGpu, pMemoryManager) 1191 #endif //__nvoc_mem_mgr_h_disabled 1192 1193 #define memmgrGetRsvdSizeForSr_HAL(pGpu, pMemoryManager) memmgrGetRsvdSizeForSr(pGpu, pMemoryManager) 1194 1195 static inline NvBool memmgrVerifyDepthSurfaceAttrs_cbe027(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 arg1) { 1196 return ((NvBool)(0 == 0)); 1197 } 1198 1199 1200 #ifdef __nvoc_mem_mgr_h_disabled 1201 static inline NvBool memmgrVerifyDepthSurfaceAttrs(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 arg1) { 1202 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1203 return NV_FALSE; 1204 } 1205 #else //__nvoc_mem_mgr_h_disabled 1206 #define memmgrVerifyDepthSurfaceAttrs(pMemoryManager, arg0, arg1) memmgrVerifyDepthSurfaceAttrs_cbe027(pMemoryManager, arg0, arg1) 1207 #endif //__nvoc_mem_mgr_h_disabled 1208 1209 #define memmgrVerifyDepthSurfaceAttrs_HAL(pMemoryManager, arg0, arg1) memmgrVerifyDepthSurfaceAttrs(pMemoryManager, arg0, arg1) 1210 1211 NV_STATUS memmgrAllocMemToSaveVgaWorkspace_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR **arg0, MEMORY_DESCRIPTOR **arg1); 1212 1213 static inline NV_STATUS memmgrAllocMemToSaveVgaWorkspace_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR **arg0, MEMORY_DESCRIPTOR **arg1) { 1214 return NV_ERR_NOT_SUPPORTED; 1215 } 1216 1217 static inline NV_STATUS memmgrAllocMemToSaveVgaWorkspace_5baef9(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR **arg0, MEMORY_DESCRIPTOR **arg1) { 1218 NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_NOT_SUPPORTED); 1219 } 1220 1221 1222 #ifdef __nvoc_mem_mgr_h_disabled 1223 static inline NV_STATUS memmgrAllocMemToSaveVgaWorkspace(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR **arg0, MEMORY_DESCRIPTOR **arg1) { 1224 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1225 return NV_ERR_NOT_SUPPORTED; 1226 } 1227 #else //__nvoc_mem_mgr_h_disabled 1228 #define memmgrAllocMemToSaveVgaWorkspace(pGpu, pMemoryManager, arg0, arg1) memmgrAllocMemToSaveVgaWorkspace_5baef9(pGpu, pMemoryManager, arg0, arg1) 1229 #endif //__nvoc_mem_mgr_h_disabled 1230 1231 #define memmgrAllocMemToSaveVgaWorkspace_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrAllocMemToSaveVgaWorkspace(pGpu, pMemoryManager, arg0, arg1) 1232 1233 NvBool memmgrComparePhysicalAddresses_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvU64 arg1, NvU32 arg2, NvU64 arg3); 1234 1235 1236 #ifdef __nvoc_mem_mgr_h_disabled 1237 static inline NvBool memmgrComparePhysicalAddresses(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvU64 arg1, NvU32 arg2, NvU64 arg3) { 1238 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1239 return NV_FALSE; 1240 } 1241 #else //__nvoc_mem_mgr_h_disabled 1242 #define memmgrComparePhysicalAddresses(pGpu, pMemoryManager, arg0, arg1, arg2, arg3) memmgrComparePhysicalAddresses_GM107(pGpu, pMemoryManager, arg0, arg1, arg2, arg3) 1243 #endif //__nvoc_mem_mgr_h_disabled 1244 1245 #define memmgrComparePhysicalAddresses_HAL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3) memmgrComparePhysicalAddresses(pGpu, pMemoryManager, arg0, arg1, arg2, arg3) 1246 1247 RmPhysAddr memmgrGetInvalidOffset_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1248 1249 1250 #ifdef __nvoc_mem_mgr_h_disabled 1251 static inline RmPhysAddr memmgrGetInvalidOffset(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1252 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1253 RmPhysAddr ret; 1254 portMemSet(&ret, 0, sizeof(RmPhysAddr)); 1255 return ret; 1256 } 1257 #else //__nvoc_mem_mgr_h_disabled 1258 #define memmgrGetInvalidOffset(pGpu, pMemoryManager) memmgrGetInvalidOffset_GM107(pGpu, pMemoryManager) 1259 #endif //__nvoc_mem_mgr_h_disabled 1260 1261 #define memmgrGetInvalidOffset_HAL(pGpu, pMemoryManager) memmgrGetInvalidOffset(pGpu, pMemoryManager) 1262 1263 NvU32 memmgrGetAddrSpaceSizeMB_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1264 1265 1266 #ifdef __nvoc_mem_mgr_h_disabled 1267 static inline NvU32 memmgrGetAddrSpaceSizeMB(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1268 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1269 return 0; 1270 } 1271 #else //__nvoc_mem_mgr_h_disabled 1272 #define memmgrGetAddrSpaceSizeMB(pGpu, pMemoryManager) memmgrGetAddrSpaceSizeMB_GM107(pGpu, pMemoryManager) 1273 #endif //__nvoc_mem_mgr_h_disabled 1274 1275 #define memmgrGetAddrSpaceSizeMB_HAL(pGpu, pMemoryManager) memmgrGetAddrSpaceSizeMB(pGpu, pMemoryManager) 1276 1277 NvU32 memmgrGetUsableMemSizeMB_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1278 1279 1280 #ifdef __nvoc_mem_mgr_h_disabled 1281 static inline NvU32 memmgrGetUsableMemSizeMB(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1282 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1283 return 0; 1284 } 1285 #else //__nvoc_mem_mgr_h_disabled 1286 #define memmgrGetUsableMemSizeMB(pGpu, pMemoryManager) memmgrGetUsableMemSizeMB_GM107(pGpu, pMemoryManager) 1287 #endif //__nvoc_mem_mgr_h_disabled 1288 1289 #define memmgrGetUsableMemSizeMB_HAL(pGpu, pMemoryManager) memmgrGetUsableMemSizeMB(pGpu, pMemoryManager) 1290 1291 NV_STATUS memmgrGetSurfacePhysAttr_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, Memory *pMemory, NvU64 *pOffset, NvU32 *pMemAperture, NvU32 *pMemKind, NvU32 *pComprOffset, NvU32 *pComprKind, NvU32 *pLineMin, NvU32 *pLineMax, NvU32 *pZCullId, NvU32 *pGpuCacheAttr, NvU32 *pGpuP2PCacheAttr, NvU64 *contigSegmentSize); 1292 1293 1294 #ifdef __nvoc_mem_mgr_h_disabled 1295 static inline NV_STATUS memmgrGetSurfacePhysAttr(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, Memory *pMemory, NvU64 *pOffset, NvU32 *pMemAperture, NvU32 *pMemKind, NvU32 *pComprOffset, NvU32 *pComprKind, NvU32 *pLineMin, NvU32 *pLineMax, NvU32 *pZCullId, NvU32 *pGpuCacheAttr, NvU32 *pGpuP2PCacheAttr, NvU64 *contigSegmentSize) { 1296 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1297 return NV_ERR_NOT_SUPPORTED; 1298 } 1299 #else //__nvoc_mem_mgr_h_disabled 1300 #define memmgrGetSurfacePhysAttr(pGpu, pMemoryManager, pMemory, pOffset, pMemAperture, pMemKind, pComprOffset, pComprKind, pLineMin, pLineMax, pZCullId, pGpuCacheAttr, pGpuP2PCacheAttr, contigSegmentSize) memmgrGetSurfacePhysAttr_GM107(pGpu, pMemoryManager, pMemory, pOffset, pMemAperture, pMemKind, pComprOffset, pComprKind, pLineMin, pLineMax, pZCullId, pGpuCacheAttr, pGpuP2PCacheAttr, contigSegmentSize) 1301 #endif //__nvoc_mem_mgr_h_disabled 1302 1303 #define memmgrGetSurfacePhysAttr_HAL(pGpu, pMemoryManager, pMemory, pOffset, pMemAperture, pMemKind, pComprOffset, pComprKind, pLineMin, pLineMax, pZCullId, pGpuCacheAttr, pGpuP2PCacheAttr, contigSegmentSize) memmgrGetSurfacePhysAttr(pGpu, pMemoryManager, pMemory, pOffset, pMemAperture, pMemKind, pComprOffset, pComprKind, pLineMin, pLineMax, pZCullId, pGpuCacheAttr, pGpuP2PCacheAttr, contigSegmentSize) 1304 1305 static inline NvBool memmgrVerifyComprAttrs_cbe027(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 arg1, NvU32 arg2) { 1306 return ((NvBool)(0 == 0)); 1307 } 1308 1309 1310 #ifdef __nvoc_mem_mgr_h_disabled 1311 static inline NvBool memmgrVerifyComprAttrs(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 arg1, NvU32 arg2) { 1312 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1313 return NV_FALSE; 1314 } 1315 #else //__nvoc_mem_mgr_h_disabled 1316 #define memmgrVerifyComprAttrs(pMemoryManager, arg0, arg1, arg2) memmgrVerifyComprAttrs_cbe027(pMemoryManager, arg0, arg1, arg2) 1317 #endif //__nvoc_mem_mgr_h_disabled 1318 1319 #define memmgrVerifyComprAttrs_HAL(pMemoryManager, arg0, arg1, arg2) memmgrVerifyComprAttrs(pMemoryManager, arg0, arg1, arg2) 1320 1321 NvBool memmgrIsKindCompressible_TU102(struct MemoryManager *pMemoryManager, NvU32 arg0); 1322 1323 1324 #ifdef __nvoc_mem_mgr_h_disabled 1325 static inline NvBool memmgrIsKindCompressible(struct MemoryManager *pMemoryManager, NvU32 arg0) { 1326 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1327 return NV_FALSE; 1328 } 1329 #else //__nvoc_mem_mgr_h_disabled 1330 #define memmgrIsKindCompressible(pMemoryManager, arg0) memmgrIsKindCompressible_TU102(pMemoryManager, arg0) 1331 #endif //__nvoc_mem_mgr_h_disabled 1332 1333 #define memmgrIsKindCompressible_HAL(pMemoryManager, arg0) memmgrIsKindCompressible(pMemoryManager, arg0) 1334 1335 static inline NvBool memmgrIsKindBlocklinear_491d52(struct MemoryManager *pMemoryManager, NvU32 arg0) { 1336 return ((NvBool)(0 != 0)); 1337 } 1338 1339 1340 #ifdef __nvoc_mem_mgr_h_disabled 1341 static inline NvBool memmgrIsKindBlocklinear(struct MemoryManager *pMemoryManager, NvU32 arg0) { 1342 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1343 return NV_FALSE; 1344 } 1345 #else //__nvoc_mem_mgr_h_disabled 1346 #define memmgrIsKindBlocklinear(pMemoryManager, arg0) memmgrIsKindBlocklinear_491d52(pMemoryManager, arg0) 1347 #endif //__nvoc_mem_mgr_h_disabled 1348 1349 #define memmgrIsKindBlocklinear_HAL(pMemoryManager, arg0) memmgrIsKindBlocklinear(pMemoryManager, arg0) 1350 1351 NvU32 memmgrChooseKindZ_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0); 1352 1353 1354 #ifdef __nvoc_mem_mgr_h_disabled 1355 static inline NvU32 memmgrChooseKindZ(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0) { 1356 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1357 return 0; 1358 } 1359 #else //__nvoc_mem_mgr_h_disabled 1360 #define memmgrChooseKindZ(pGpu, pMemoryManager, arg0) memmgrChooseKindZ_TU102(pGpu, pMemoryManager, arg0) 1361 #endif //__nvoc_mem_mgr_h_disabled 1362 1363 #define memmgrChooseKindZ_HAL(pGpu, pMemoryManager, arg0) memmgrChooseKindZ(pGpu, pMemoryManager, arg0) 1364 1365 NvU32 memmgrChooseKindCompressZ_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0); 1366 1367 1368 #ifdef __nvoc_mem_mgr_h_disabled 1369 static inline NvU32 memmgrChooseKindCompressZ(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0) { 1370 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1371 return 0; 1372 } 1373 #else //__nvoc_mem_mgr_h_disabled 1374 #define memmgrChooseKindCompressZ(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressZ_TU102(pGpu, pMemoryManager, arg0) 1375 #endif //__nvoc_mem_mgr_h_disabled 1376 1377 #define memmgrChooseKindCompressZ_HAL(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressZ(pGpu, pMemoryManager, arg0) 1378 1379 static inline NvU32 memmgrChooseKindCompressCForMS2_4a4dee(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1380 return 0; 1381 } 1382 1383 1384 #ifdef __nvoc_mem_mgr_h_disabled 1385 static inline NvU32 memmgrChooseKindCompressCForMS2(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1386 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1387 return 0; 1388 } 1389 #else //__nvoc_mem_mgr_h_disabled 1390 #define memmgrChooseKindCompressCForMS2(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressCForMS2_4a4dee(pGpu, pMemoryManager, arg0) 1391 #endif //__nvoc_mem_mgr_h_disabled 1392 1393 #define memmgrChooseKindCompressCForMS2_HAL(pGpu, pMemoryManager, arg0) memmgrChooseKindCompressCForMS2(pGpu, pMemoryManager, arg0) 1394 1395 NvU32 memmgrGetUncompressedKind_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 kind, NvBool releaseReacquire); 1396 1397 1398 #ifdef __nvoc_mem_mgr_h_disabled 1399 static inline NvU32 memmgrGetUncompressedKind(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 kind, NvBool releaseReacquire) { 1400 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1401 return 0; 1402 } 1403 #else //__nvoc_mem_mgr_h_disabled 1404 #define memmgrGetUncompressedKind(pGpu, pMemoryManager, kind, releaseReacquire) memmgrGetUncompressedKind_TU102(pGpu, pMemoryManager, kind, releaseReacquire) 1405 #endif //__nvoc_mem_mgr_h_disabled 1406 1407 #define memmgrGetUncompressedKind_HAL(pGpu, pMemoryManager, kind, releaseReacquire) memmgrGetUncompressedKind(pGpu, pMemoryManager, kind, releaseReacquire) 1408 1409 static inline NV_STATUS memmgrGetUncompressedKindForMS2_5baef9(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 *arg1) { 1410 NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_NOT_SUPPORTED); 1411 } 1412 1413 1414 #ifdef __nvoc_mem_mgr_h_disabled 1415 static inline NV_STATUS memmgrGetUncompressedKindForMS2(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvU32 *arg1) { 1416 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1417 return NV_ERR_NOT_SUPPORTED; 1418 } 1419 #else //__nvoc_mem_mgr_h_disabled 1420 #define memmgrGetUncompressedKindForMS2(pGpu, pMemoryManager, arg0, arg1) memmgrGetUncompressedKindForMS2_5baef9(pGpu, pMemoryManager, arg0, arg1) 1421 #endif //__nvoc_mem_mgr_h_disabled 1422 1423 #define memmgrGetUncompressedKindForMS2_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrGetUncompressedKindForMS2(pGpu, pMemoryManager, arg0, arg1) 1424 1425 NV_STATUS memmgrChooseKind_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0, NvU32 arg1, NvU32 *arg2); 1426 1427 1428 #ifdef __nvoc_mem_mgr_h_disabled 1429 static inline NV_STATUS memmgrChooseKind(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0, NvU32 arg1, NvU32 *arg2) { 1430 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1431 return NV_ERR_NOT_SUPPORTED; 1432 } 1433 #else //__nvoc_mem_mgr_h_disabled 1434 #define memmgrChooseKind(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrChooseKind_TU102(pGpu, pMemoryManager, arg0, arg1, arg2) 1435 #endif //__nvoc_mem_mgr_h_disabled 1436 1437 #define memmgrChooseKind_HAL(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrChooseKind(pGpu, pMemoryManager, arg0, arg1, arg2) 1438 1439 NvBool memmgrIsKind_TU102(struct MemoryManager *pMemoryManager, FB_IS_KIND_OP arg0, NvU32 arg1); 1440 1441 1442 #ifdef __nvoc_mem_mgr_h_disabled 1443 static inline NvBool memmgrIsKind(struct MemoryManager *pMemoryManager, FB_IS_KIND_OP arg0, NvU32 arg1) { 1444 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1445 return NV_FALSE; 1446 } 1447 #else //__nvoc_mem_mgr_h_disabled 1448 #define memmgrIsKind(pMemoryManager, arg0, arg1) memmgrIsKind_TU102(pMemoryManager, arg0, arg1) 1449 #endif //__nvoc_mem_mgr_h_disabled 1450 1451 #define memmgrIsKind_HAL(pMemoryManager, arg0, arg1) memmgrIsKind(pMemoryManager, arg0, arg1) 1452 1453 NvU32 memmgrGetMessageKind_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1454 1455 1456 #ifdef __nvoc_mem_mgr_h_disabled 1457 static inline NvU32 memmgrGetMessageKind(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1458 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1459 return 0; 1460 } 1461 #else //__nvoc_mem_mgr_h_disabled 1462 #define memmgrGetMessageKind(pGpu, pMemoryManager) memmgrGetMessageKind_TU102(pGpu, pMemoryManager) 1463 #endif //__nvoc_mem_mgr_h_disabled 1464 1465 #define memmgrGetMessageKind_HAL(pGpu, pMemoryManager) memmgrGetMessageKind(pGpu, pMemoryManager) 1466 1467 NvU32 memmgrGetDefaultPteKindForNoHandle_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1468 1469 1470 #ifdef __nvoc_mem_mgr_h_disabled 1471 static inline NvU32 memmgrGetDefaultPteKindForNoHandle(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1472 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1473 return 0; 1474 } 1475 #else //__nvoc_mem_mgr_h_disabled 1476 #define memmgrGetDefaultPteKindForNoHandle(pGpu, pMemoryManager) memmgrGetDefaultPteKindForNoHandle_TU102(pGpu, pMemoryManager) 1477 #endif //__nvoc_mem_mgr_h_disabled 1478 1479 #define memmgrGetDefaultPteKindForNoHandle_HAL(pGpu, pMemoryManager) memmgrGetDefaultPteKindForNoHandle(pGpu, pMemoryManager) 1480 1481 NvBool memmgrIsSurfaceBlockLinear_TU102(struct MemoryManager *pMemoryManager, Memory *arg0, NvU32 arg1, NvU32 arg2); 1482 1483 1484 #ifdef __nvoc_mem_mgr_h_disabled 1485 static inline NvBool memmgrIsSurfaceBlockLinear(struct MemoryManager *pMemoryManager, Memory *arg0, NvU32 arg1, NvU32 arg2) { 1486 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1487 return NV_FALSE; 1488 } 1489 #else //__nvoc_mem_mgr_h_disabled 1490 #define memmgrIsSurfaceBlockLinear(pMemoryManager, arg0, arg1, arg2) memmgrIsSurfaceBlockLinear_TU102(pMemoryManager, arg0, arg1, arg2) 1491 #endif //__nvoc_mem_mgr_h_disabled 1492 1493 #define memmgrIsSurfaceBlockLinear_HAL(pMemoryManager, arg0, arg1, arg2) memmgrIsSurfaceBlockLinear(pMemoryManager, arg0, arg1, arg2) 1494 1495 NvU32 memmgrGetHwPteKindFromSwPteKind_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 pteKind); 1496 1497 1498 #ifdef __nvoc_mem_mgr_h_disabled 1499 static inline NvU32 memmgrGetHwPteKindFromSwPteKind(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 pteKind) { 1500 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1501 return 0; 1502 } 1503 #else //__nvoc_mem_mgr_h_disabled 1504 #define memmgrGetHwPteKindFromSwPteKind(pGpu, pMemoryManager, pteKind) memmgrGetHwPteKindFromSwPteKind_TU102(pGpu, pMemoryManager, pteKind) 1505 #endif //__nvoc_mem_mgr_h_disabled 1506 1507 #define memmgrGetHwPteKindFromSwPteKind_HAL(pGpu, pMemoryManager, pteKind) memmgrGetHwPteKindFromSwPteKind(pGpu, pMemoryManager, pteKind) 1508 1509 NvU32 memmgrGetSwPteKindFromHwPteKind_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 pteKind); 1510 1511 1512 #ifdef __nvoc_mem_mgr_h_disabled 1513 static inline NvU32 memmgrGetSwPteKindFromHwPteKind(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 pteKind) { 1514 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1515 return 0; 1516 } 1517 #else //__nvoc_mem_mgr_h_disabled 1518 #define memmgrGetSwPteKindFromHwPteKind(pGpu, pMemoryManager, pteKind) memmgrGetSwPteKindFromHwPteKind_TU102(pGpu, pMemoryManager, pteKind) 1519 #endif //__nvoc_mem_mgr_h_disabled 1520 1521 #define memmgrGetSwPteKindFromHwPteKind_HAL(pGpu, pMemoryManager, pteKind) memmgrGetSwPteKindFromHwPteKind(pGpu, pMemoryManager, pteKind) 1522 1523 void memmgrGetPteKindForScrubber_TU102(struct MemoryManager *pMemoryManager, NvU32 *arg0); 1524 1525 1526 #ifdef __nvoc_mem_mgr_h_disabled 1527 static inline void memmgrGetPteKindForScrubber(struct MemoryManager *pMemoryManager, NvU32 *arg0) { 1528 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1529 } 1530 #else //__nvoc_mem_mgr_h_disabled 1531 #define memmgrGetPteKindForScrubber(pMemoryManager, arg0) memmgrGetPteKindForScrubber_TU102(pMemoryManager, arg0) 1532 #endif //__nvoc_mem_mgr_h_disabled 1533 1534 #define memmgrGetPteKindForScrubber_HAL(pMemoryManager, arg0) memmgrGetPteKindForScrubber(pMemoryManager, arg0) 1535 1536 NvU32 memmgrGetCtagOffsetFromParams_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0); 1537 1538 1539 #ifdef __nvoc_mem_mgr_h_disabled 1540 static inline NvU32 memmgrGetCtagOffsetFromParams(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0) { 1541 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1542 return 0; 1543 } 1544 #else //__nvoc_mem_mgr_h_disabled 1545 #define memmgrGetCtagOffsetFromParams(pGpu, pMemoryManager, arg0) memmgrGetCtagOffsetFromParams_TU102(pGpu, pMemoryManager, arg0) 1546 #endif //__nvoc_mem_mgr_h_disabled 1547 1548 #define memmgrGetCtagOffsetFromParams_HAL(pGpu, pMemoryManager, arg0) memmgrGetCtagOffsetFromParams(pGpu, pMemoryManager, arg0) 1549 1550 void memmgrSetCtagOffsetInParams_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0, NvU32 arg1); 1551 1552 1553 #ifdef __nvoc_mem_mgr_h_disabled 1554 static inline void memmgrSetCtagOffsetInParams(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0, NvU32 arg1) { 1555 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1556 } 1557 #else //__nvoc_mem_mgr_h_disabled 1558 #define memmgrSetCtagOffsetInParams(pGpu, pMemoryManager, arg0, arg1) memmgrSetCtagOffsetInParams_TU102(pGpu, pMemoryManager, arg0, arg1) 1559 #endif //__nvoc_mem_mgr_h_disabled 1560 1561 #define memmgrSetCtagOffsetInParams_HAL(pGpu, pMemoryManager, arg0, arg1) memmgrSetCtagOffsetInParams(pGpu, pMemoryManager, arg0, arg1) 1562 1563 void memmgrChannelPushSemaphoreMethodsBlock_GP100(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU64 arg1, NvU32 arg2, NvU32 **arg3); 1564 1565 1566 #ifdef __nvoc_mem_mgr_h_disabled 1567 static inline void memmgrChannelPushSemaphoreMethodsBlock(struct MemoryManager *pMemoryManager, NvU32 arg0, NvU64 arg1, NvU32 arg2, NvU32 **arg3) { 1568 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1569 } 1570 #else //__nvoc_mem_mgr_h_disabled 1571 #define memmgrChannelPushSemaphoreMethodsBlock(pMemoryManager, arg0, arg1, arg2, arg3) memmgrChannelPushSemaphoreMethodsBlock_GP100(pMemoryManager, arg0, arg1, arg2, arg3) 1572 #endif //__nvoc_mem_mgr_h_disabled 1573 1574 #define memmgrChannelPushSemaphoreMethodsBlock_HAL(pMemoryManager, arg0, arg1, arg2, arg3) memmgrChannelPushSemaphoreMethodsBlock(pMemoryManager, arg0, arg1, arg2, arg3) 1575 1576 void memmgrChannelPushAddressMethodsBlock_GP100(struct MemoryManager *pMemoryManager, NvBool arg0, NvU32 arg1, RmPhysAddr arg2, NvU32 **arg3); 1577 1578 1579 #ifdef __nvoc_mem_mgr_h_disabled 1580 static inline void memmgrChannelPushAddressMethodsBlock(struct MemoryManager *pMemoryManager, NvBool arg0, NvU32 arg1, RmPhysAddr arg2, NvU32 **arg3) { 1581 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1582 } 1583 #else //__nvoc_mem_mgr_h_disabled 1584 #define memmgrChannelPushAddressMethodsBlock(pMemoryManager, arg0, arg1, arg2, arg3) memmgrChannelPushAddressMethodsBlock_GP100(pMemoryManager, arg0, arg1, arg2, arg3) 1585 #endif //__nvoc_mem_mgr_h_disabled 1586 1587 #define memmgrChannelPushAddressMethodsBlock_HAL(pMemoryManager, arg0, arg1, arg2, arg3) memmgrChannelPushAddressMethodsBlock(pMemoryManager, arg0, arg1, arg2, arg3) 1588 1589 NV_STATUS memmgrScrubMapDoorbellRegion_GV100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 1590 1591 1592 #ifdef __nvoc_mem_mgr_h_disabled 1593 static inline NV_STATUS memmgrScrubMapDoorbellRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 1594 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1595 return NV_ERR_NOT_SUPPORTED; 1596 } 1597 #else //__nvoc_mem_mgr_h_disabled 1598 #define memmgrScrubMapDoorbellRegion(pGpu, pMemoryManager, arg0) memmgrScrubMapDoorbellRegion_GV100(pGpu, pMemoryManager, arg0) 1599 #endif //__nvoc_mem_mgr_h_disabled 1600 1601 #define memmgrScrubMapDoorbellRegion_HAL(pGpu, pMemoryManager, arg0) memmgrScrubMapDoorbellRegion(pGpu, pMemoryManager, arg0) 1602 1603 NV_STATUS memmgrSetAllocParameters_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo); 1604 1605 1606 #ifdef __nvoc_mem_mgr_h_disabled 1607 static inline NV_STATUS memmgrSetAllocParameters(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *pFbAllocInfo) { 1608 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1609 return NV_ERR_NOT_SUPPORTED; 1610 } 1611 #else //__nvoc_mem_mgr_h_disabled 1612 #define memmgrSetAllocParameters(pGpu, pMemoryManager, pFbAllocInfo) memmgrSetAllocParameters_GM107(pGpu, pMemoryManager, pFbAllocInfo) 1613 #endif //__nvoc_mem_mgr_h_disabled 1614 1615 #define memmgrSetAllocParameters_HAL(pGpu, pMemoryManager, pFbAllocInfo) memmgrSetAllocParameters(pGpu, pMemoryManager, pFbAllocInfo) 1616 1617 void memmgrCalcReservedFbSpaceForUVM_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0); 1618 1619 1620 #ifdef __nvoc_mem_mgr_h_disabled 1621 static inline void memmgrCalcReservedFbSpaceForUVM(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0) { 1622 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1623 } 1624 #else //__nvoc_mem_mgr_h_disabled 1625 #define memmgrCalcReservedFbSpaceForUVM(pGpu, pMemoryManager, arg0) memmgrCalcReservedFbSpaceForUVM_GM107(pGpu, pMemoryManager, arg0) 1626 #endif //__nvoc_mem_mgr_h_disabled 1627 1628 #define memmgrCalcReservedFbSpaceForUVM_HAL(pGpu, pMemoryManager, arg0) memmgrCalcReservedFbSpaceForUVM(pGpu, pMemoryManager, arg0) 1629 1630 void memmgrCalcReservedFbSpaceHal_FWCLIENT(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0, NvU64 *arg1, NvU64 *arg2); 1631 1632 void memmgrCalcReservedFbSpaceHal_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0, NvU64 *arg1, NvU64 *arg2); 1633 1634 1635 #ifdef __nvoc_mem_mgr_h_disabled 1636 static inline void memmgrCalcReservedFbSpaceHal(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0, NvU64 *arg1, NvU64 *arg2) { 1637 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1638 } 1639 #else //__nvoc_mem_mgr_h_disabled 1640 #define memmgrCalcReservedFbSpaceHal(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrCalcReservedFbSpaceHal_FWCLIENT(pGpu, pMemoryManager, arg0, arg1, arg2) 1641 #endif //__nvoc_mem_mgr_h_disabled 1642 1643 #define memmgrCalcReservedFbSpaceHal_HAL(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrCalcReservedFbSpaceHal(pGpu, pMemoryManager, arg0, arg1, arg2) 1644 1645 static inline NvU32 memmgrGetGrHeapReservationSize_4a4dee(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1646 return 0; 1647 } 1648 1649 NvU32 memmgrGetGrHeapReservationSize_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1650 1651 1652 #ifdef __nvoc_mem_mgr_h_disabled 1653 static inline NvU32 memmgrGetGrHeapReservationSize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1654 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1655 return 0; 1656 } 1657 #else //__nvoc_mem_mgr_h_disabled 1658 #define memmgrGetGrHeapReservationSize(pGpu, pMemoryManager) memmgrGetGrHeapReservationSize_4a4dee(pGpu, pMemoryManager) 1659 #endif //__nvoc_mem_mgr_h_disabled 1660 1661 #define memmgrGetGrHeapReservationSize_HAL(pGpu, pMemoryManager) memmgrGetGrHeapReservationSize(pGpu, pMemoryManager) 1662 1663 NvU32 memmgrGetRunlistEntriesReservedFbSpace_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1664 1665 1666 #ifdef __nvoc_mem_mgr_h_disabled 1667 static inline NvU32 memmgrGetRunlistEntriesReservedFbSpace(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1668 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1669 return 0; 1670 } 1671 #else //__nvoc_mem_mgr_h_disabled 1672 #define memmgrGetRunlistEntriesReservedFbSpace(pGpu, pMemoryManager) memmgrGetRunlistEntriesReservedFbSpace_GM107(pGpu, pMemoryManager) 1673 #endif //__nvoc_mem_mgr_h_disabled 1674 1675 #define memmgrGetRunlistEntriesReservedFbSpace_HAL(pGpu, pMemoryManager) memmgrGetRunlistEntriesReservedFbSpace(pGpu, pMemoryManager) 1676 1677 NvU32 memmgrGetUserdReservedFbSpace_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1678 1679 1680 #ifdef __nvoc_mem_mgr_h_disabled 1681 static inline NvU32 memmgrGetUserdReservedFbSpace(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1682 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1683 return 0; 1684 } 1685 #else //__nvoc_mem_mgr_h_disabled 1686 #define memmgrGetUserdReservedFbSpace(pGpu, pMemoryManager) memmgrGetUserdReservedFbSpace_GM107(pGpu, pMemoryManager) 1687 #endif //__nvoc_mem_mgr_h_disabled 1688 1689 #define memmgrGetUserdReservedFbSpace_HAL(pGpu, pMemoryManager) memmgrGetUserdReservedFbSpace(pGpu, pMemoryManager) 1690 1691 NV_STATUS memmgrInitReservedMemory_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0); 1692 1693 1694 #ifdef __nvoc_mem_mgr_h_disabled 1695 static inline NV_STATUS memmgrInitReservedMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0) { 1696 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1697 return NV_ERR_NOT_SUPPORTED; 1698 } 1699 #else //__nvoc_mem_mgr_h_disabled 1700 #define memmgrInitReservedMemory(pGpu, pMemoryManager, arg0) memmgrInitReservedMemory_GM107(pGpu, pMemoryManager, arg0) 1701 #endif //__nvoc_mem_mgr_h_disabled 1702 1703 #define memmgrInitReservedMemory_HAL(pGpu, pMemoryManager, arg0) memmgrInitReservedMemory(pGpu, pMemoryManager, arg0) 1704 1705 NV_STATUS memmgrPreInitReservedMemory_FWCLIENT(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1706 1707 NV_STATUS memmgrPreInitReservedMemory_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1708 1709 1710 #ifdef __nvoc_mem_mgr_h_disabled 1711 static inline NV_STATUS memmgrPreInitReservedMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1712 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1713 return NV_ERR_NOT_SUPPORTED; 1714 } 1715 #else //__nvoc_mem_mgr_h_disabled 1716 #define memmgrPreInitReservedMemory(pGpu, pMemoryManager) memmgrPreInitReservedMemory_FWCLIENT(pGpu, pMemoryManager) 1717 #endif //__nvoc_mem_mgr_h_disabled 1718 1719 #define memmgrPreInitReservedMemory_HAL(pGpu, pMemoryManager) memmgrPreInitReservedMemory(pGpu, pMemoryManager) 1720 1721 NV_STATUS memmgrInitBaseFbRegions_FWCLIENT(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1722 1723 NV_STATUS memmgrInitBaseFbRegions_GP102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1724 1725 1726 #ifdef __nvoc_mem_mgr_h_disabled 1727 static inline NV_STATUS memmgrInitBaseFbRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1728 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1729 return NV_ERR_NOT_SUPPORTED; 1730 } 1731 #else //__nvoc_mem_mgr_h_disabled 1732 #define memmgrInitBaseFbRegions(pGpu, pMemoryManager) memmgrInitBaseFbRegions_FWCLIENT(pGpu, pMemoryManager) 1733 #endif //__nvoc_mem_mgr_h_disabled 1734 1735 #define memmgrInitBaseFbRegions_HAL(pGpu, pMemoryManager) memmgrInitBaseFbRegions(pGpu, pMemoryManager) 1736 1737 NV_STATUS memmgrSetMemDescPageSize_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMEMORY_DESCRIPTOR arg0, ADDRESS_TRANSLATION arg1, RM_ATTR_PAGE_SIZE arg2); 1738 1739 1740 #ifdef __nvoc_mem_mgr_h_disabled 1741 static inline NV_STATUS memmgrSetMemDescPageSize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMEMORY_DESCRIPTOR arg0, ADDRESS_TRANSLATION arg1, RM_ATTR_PAGE_SIZE arg2) { 1742 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1743 return NV_ERR_NOT_SUPPORTED; 1744 } 1745 #else //__nvoc_mem_mgr_h_disabled 1746 #define memmgrSetMemDescPageSize(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrSetMemDescPageSize_GM107(pGpu, pMemoryManager, arg0, arg1, arg2) 1747 #endif //__nvoc_mem_mgr_h_disabled 1748 1749 #define memmgrSetMemDescPageSize_HAL(pGpu, pMemoryManager, arg0, arg1, arg2) memmgrSetMemDescPageSize(pGpu, pMemoryManager, arg0, arg1, arg2) 1750 1751 NV_STATUS memmgrSetPartitionableMem_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1752 1753 1754 #ifdef __nvoc_mem_mgr_h_disabled 1755 static inline NV_STATUS memmgrSetPartitionableMem(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1756 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1757 return NV_ERR_NOT_SUPPORTED; 1758 } 1759 #else //__nvoc_mem_mgr_h_disabled 1760 #define memmgrSetPartitionableMem(pGpu, pMemoryManager) memmgrSetPartitionableMem_IMPL(pGpu, pMemoryManager) 1761 #endif //__nvoc_mem_mgr_h_disabled 1762 1763 #define memmgrSetPartitionableMem_HAL(pGpu, pMemoryManager) memmgrSetPartitionableMem(pGpu, pMemoryManager) 1764 1765 NV_STATUS memmgrAllocMIGGPUInstanceMemory_PF(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 swizzId, NvHandle *phMemory, struct NV_RANGE *pAddrRange, struct Heap **ppMemoryPartitionHeap); 1766 1767 1768 #ifdef __nvoc_mem_mgr_h_disabled 1769 static inline NV_STATUS memmgrAllocMIGGPUInstanceMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 swizzId, NvHandle *phMemory, struct NV_RANGE *pAddrRange, struct Heap **ppMemoryPartitionHeap) { 1770 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1771 return NV_ERR_NOT_SUPPORTED; 1772 } 1773 #else //__nvoc_mem_mgr_h_disabled 1774 #define memmgrAllocMIGGPUInstanceMemory(pGpu, pMemoryManager, swizzId, phMemory, pAddrRange, ppMemoryPartitionHeap) memmgrAllocMIGGPUInstanceMemory_PF(pGpu, pMemoryManager, swizzId, phMemory, pAddrRange, ppMemoryPartitionHeap) 1775 #endif //__nvoc_mem_mgr_h_disabled 1776 1777 #define memmgrAllocMIGGPUInstanceMemory_HAL(pGpu, pMemoryManager, swizzId, phMemory, pAddrRange, ppMemoryPartitionHeap) memmgrAllocMIGGPUInstanceMemory(pGpu, pMemoryManager, swizzId, phMemory, pAddrRange, ppMemoryPartitionHeap) 1778 1779 NV_STATUS memmgrGetBlackListPagesForHeap_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *pHeap); 1780 1781 1782 #ifdef __nvoc_mem_mgr_h_disabled 1783 static inline NV_STATUS memmgrGetBlackListPagesForHeap(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *pHeap) { 1784 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1785 return NV_ERR_NOT_SUPPORTED; 1786 } 1787 #else //__nvoc_mem_mgr_h_disabled 1788 #define memmgrGetBlackListPagesForHeap(pGpu, pMemoryManager, pHeap) memmgrGetBlackListPagesForHeap_GM107(pGpu, pMemoryManager, pHeap) 1789 #endif //__nvoc_mem_mgr_h_disabled 1790 1791 #define memmgrGetBlackListPagesForHeap_HAL(pGpu, pMemoryManager, pHeap) memmgrGetBlackListPagesForHeap(pGpu, pMemoryManager, pHeap) 1792 1793 static inline NV_STATUS memmgrDiscoverMIGPartitionableMemoryRange_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct NV_RANGE *pMemoryRange) { 1794 return NV_ERR_NOT_SUPPORTED; 1795 } 1796 1797 1798 #ifdef __nvoc_mem_mgr_h_disabled 1799 static inline NV_STATUS memmgrDiscoverMIGPartitionableMemoryRange(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct NV_RANGE *pMemoryRange) { 1800 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1801 return NV_ERR_NOT_SUPPORTED; 1802 } 1803 #else //__nvoc_mem_mgr_h_disabled 1804 #define memmgrDiscoverMIGPartitionableMemoryRange(pGpu, pMemoryManager, pMemoryRange) memmgrDiscoverMIGPartitionableMemoryRange_46f6a7(pGpu, pMemoryManager, pMemoryRange) 1805 #endif //__nvoc_mem_mgr_h_disabled 1806 1807 #define memmgrDiscoverMIGPartitionableMemoryRange_HAL(pGpu, pMemoryManager, pMemoryRange) memmgrDiscoverMIGPartitionableMemoryRange(pGpu, pMemoryManager, pMemoryRange) 1808 1809 NvU32 memmgrGetFBEndReserveSizeEstimate_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1810 1811 1812 #ifdef __nvoc_mem_mgr_h_disabled 1813 static inline NvU32 memmgrGetFBEndReserveSizeEstimate(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1814 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1815 return 0; 1816 } 1817 #else //__nvoc_mem_mgr_h_disabled 1818 #define memmgrGetFBEndReserveSizeEstimate(pGpu, pMemoryManager) memmgrGetFBEndReserveSizeEstimate_GM107(pGpu, pMemoryManager) 1819 #endif //__nvoc_mem_mgr_h_disabled 1820 1821 #define memmgrGetFBEndReserveSizeEstimate_HAL(pGpu, pMemoryManager) memmgrGetFBEndReserveSizeEstimate(pGpu, pMemoryManager) 1822 1823 NV_STATUS memmgrValidateFBEndReservation_PF(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1824 1825 1826 #ifdef __nvoc_mem_mgr_h_disabled 1827 static inline NV_STATUS memmgrValidateFBEndReservation(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1828 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1829 return NV_ERR_NOT_SUPPORTED; 1830 } 1831 #else //__nvoc_mem_mgr_h_disabled 1832 #define memmgrValidateFBEndReservation(pGpu, pMemoryManager) memmgrValidateFBEndReservation_PF(pGpu, pMemoryManager) 1833 #endif //__nvoc_mem_mgr_h_disabled 1834 1835 #define memmgrValidateFBEndReservation_HAL(pGpu, pMemoryManager) memmgrValidateFBEndReservation(pGpu, pMemoryManager) 1836 1837 static inline NV_STATUS memmgrReserveMemoryForPmu_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1838 return NV_OK; 1839 } 1840 1841 1842 #ifdef __nvoc_mem_mgr_h_disabled 1843 static inline NV_STATUS memmgrReserveMemoryForPmu(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1844 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1845 return NV_ERR_NOT_SUPPORTED; 1846 } 1847 #else //__nvoc_mem_mgr_h_disabled 1848 #define memmgrReserveMemoryForPmu(pGpu, pMemoryManager) memmgrReserveMemoryForPmu_56cd7a(pGpu, pMemoryManager) 1849 #endif //__nvoc_mem_mgr_h_disabled 1850 1851 #define memmgrReserveMemoryForPmu_HAL(pGpu, pMemoryManager) memmgrReserveMemoryForPmu(pGpu, pMemoryManager) 1852 1853 void memmgrFreeFbsrMemory_KERNEL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1854 1855 1856 #ifdef __nvoc_mem_mgr_h_disabled 1857 static inline void memmgrFreeFbsrMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1858 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1859 } 1860 #else //__nvoc_mem_mgr_h_disabled 1861 #define memmgrFreeFbsrMemory(pGpu, pMemoryManager) memmgrFreeFbsrMemory_KERNEL(pGpu, pMemoryManager) 1862 #endif //__nvoc_mem_mgr_h_disabled 1863 1864 #define memmgrFreeFbsrMemory_HAL(pGpu, pMemoryManager) memmgrFreeFbsrMemory(pGpu, pMemoryManager) 1865 1866 static inline NV_STATUS memmgrReserveVgaWorkspaceMemDescForFbsr_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1867 return NV_ERR_NOT_SUPPORTED; 1868 } 1869 1870 NV_STATUS memmgrReserveVgaWorkspaceMemDescForFbsr_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1871 1872 1873 #ifdef __nvoc_mem_mgr_h_disabled 1874 static inline NV_STATUS memmgrReserveVgaWorkspaceMemDescForFbsr(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1875 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1876 return NV_ERR_NOT_SUPPORTED; 1877 } 1878 #else //__nvoc_mem_mgr_h_disabled 1879 #define memmgrReserveVgaWorkspaceMemDescForFbsr(pGpu, pMemoryManager) memmgrReserveVgaWorkspaceMemDescForFbsr_46f6a7(pGpu, pMemoryManager) 1880 #endif //__nvoc_mem_mgr_h_disabled 1881 1882 #define memmgrReserveVgaWorkspaceMemDescForFbsr_HAL(pGpu, pMemoryManager) memmgrReserveVgaWorkspaceMemDescForFbsr(pGpu, pMemoryManager) 1883 1884 static inline NV_STATUS memmgrCalculateHeapOffsetWithGSP_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *offset) { 1885 return NV_ERR_NOT_SUPPORTED; 1886 } 1887 1888 1889 #ifdef __nvoc_mem_mgr_h_disabled 1890 static inline NV_STATUS memmgrCalculateHeapOffsetWithGSP(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *offset) { 1891 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1892 return NV_ERR_NOT_SUPPORTED; 1893 } 1894 #else //__nvoc_mem_mgr_h_disabled 1895 #define memmgrCalculateHeapOffsetWithGSP(pGpu, pMemoryManager, offset) memmgrCalculateHeapOffsetWithGSP_46f6a7(pGpu, pMemoryManager, offset) 1896 #endif //__nvoc_mem_mgr_h_disabled 1897 1898 #define memmgrCalculateHeapOffsetWithGSP_HAL(pGpu, pMemoryManager, offset) memmgrCalculateHeapOffsetWithGSP(pGpu, pMemoryManager, offset) 1899 1900 NvBool memmgrIsGspOwnedMemory_KERNEL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc); 1901 1902 1903 #ifdef __nvoc_mem_mgr_h_disabled 1904 static inline NvBool memmgrIsGspOwnedMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc) { 1905 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 1906 return NV_FALSE; 1907 } 1908 #else //__nvoc_mem_mgr_h_disabled 1909 #define memmgrIsGspOwnedMemory(pGpu, pMemoryManager, pMemDesc) memmgrIsGspOwnedMemory_KERNEL(pGpu, pMemoryManager, pMemDesc) 1910 #endif //__nvoc_mem_mgr_h_disabled 1911 1912 #define memmgrIsGspOwnedMemory_HAL(pGpu, pMemoryManager, pMemDesc) memmgrIsGspOwnedMemory(pGpu, pMemoryManager, pMemDesc) 1913 1914 NV_STATUS memmgrConstructEngine_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, ENGDESCRIPTOR arg0); 1915 1916 static inline NV_STATUS memmgrConstructEngine_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, ENGDESCRIPTOR arg0) { 1917 return pMemoryManager->__memmgrConstructEngine__(pGpu, pMemoryManager, arg0); 1918 } 1919 1920 NV_STATUS memmgrStatePreInitLocked_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1921 1922 static inline NV_STATUS memmgrStatePreInitLocked_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1923 return pMemoryManager->__memmgrStatePreInitLocked__(pGpu, pMemoryManager); 1924 } 1925 1926 NV_STATUS memmgrStateInitLocked_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1927 1928 static inline NV_STATUS memmgrStateInitLocked_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1929 return pMemoryManager->__memmgrStateInitLocked__(pGpu, pMemoryManager); 1930 } 1931 1932 NV_STATUS memmgrStateLoad_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0); 1933 1934 static inline NV_STATUS memmgrStateLoad_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1935 return pMemoryManager->__memmgrStateLoad__(pGpu, pMemoryManager, arg0); 1936 } 1937 1938 NV_STATUS memmgrStatePostLoad_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0); 1939 1940 static inline NV_STATUS memmgrStatePostLoad_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1941 return pMemoryManager->__memmgrStatePostLoad__(pGpu, pMemoryManager, arg0); 1942 } 1943 1944 NV_STATUS memmgrStatePreUnload_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0); 1945 1946 static inline NV_STATUS memmgrStatePreUnload_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1947 return pMemoryManager->__memmgrStatePreUnload__(pGpu, pMemoryManager, arg0); 1948 } 1949 1950 NV_STATUS memmgrStateUnload_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0); 1951 1952 static inline NV_STATUS memmgrStateUnload_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0) { 1953 return pMemoryManager->__memmgrStateUnload__(pGpu, pMemoryManager, arg0); 1954 } 1955 1956 void memmgrStateDestroy_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1957 1958 static inline void memmgrStateDestroy_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1959 pMemoryManager->__memmgrStateDestroy__(pGpu, pMemoryManager); 1960 } 1961 1962 NV_STATUS memmgrMemUtilsSec2CtxInit_GH100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 1963 1964 static inline NV_STATUS memmgrMemUtilsSec2CtxInit_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 1965 return NV_ERR_NOT_SUPPORTED; 1966 } 1967 1968 static inline NV_STATUS memmgrMemUtilsSec2CtxInit_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 1969 return pMemoryManager->__memmgrMemUtilsSec2CtxInit__(pGpu, pMemoryManager, arg0); 1970 } 1971 1972 NvBool memmgrMemUtilsCheckMemoryFastScrubEnable_GH100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvBool arg1, RmPhysAddr arg2, NvU32 arg3, NV_ADDRESS_SPACE arg4); 1973 1974 static inline NvBool memmgrMemUtilsCheckMemoryFastScrubEnable_491d52(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvBool arg1, RmPhysAddr arg2, NvU32 arg3, NV_ADDRESS_SPACE arg4) { 1975 return ((NvBool)(0 != 0)); 1976 } 1977 1978 static inline NvBool memmgrMemUtilsCheckMemoryFastScrubEnable_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 arg0, NvBool arg1, RmPhysAddr arg2, NvU32 arg3, NV_ADDRESS_SPACE arg4) { 1979 return pMemoryManager->__memmgrMemUtilsCheckMemoryFastScrubEnable__(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4); 1980 } 1981 1982 NV_STATUS memmgrAllocDetermineAlignment_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pMemSize, NvU64 *pAlign, NvU64 alignPad, NvU32 allocFlags, NvU32 retAttr, NvU32 retAttr2, NvU64 hwAlignment); 1983 1984 NV_STATUS memmgrAllocDetermineAlignment_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pMemSize, NvU64 *pAlign, NvU64 alignPad, NvU32 allocFlags, NvU32 retAttr, NvU32 retAttr2, NvU64 hwAlignment); 1985 1986 static inline NV_STATUS memmgrAllocDetermineAlignment_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pMemSize, NvU64 *pAlign, NvU64 alignPad, NvU32 allocFlags, NvU32 retAttr, NvU32 retAttr2, NvU64 hwAlignment) { 1987 return pMemoryManager->__memmgrAllocDetermineAlignment__(pGpu, pMemoryManager, pMemSize, pAlign, alignPad, allocFlags, retAttr, retAttr2, hwAlignment); 1988 } 1989 1990 NvU64 memmgrGetMaxContextSize_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1991 1992 NvU64 memmgrGetMaxContextSize_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1993 1994 NvU64 memmgrGetMaxContextSize_AD102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 1995 1996 static inline NvU64 memmgrGetMaxContextSize_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 1997 return pMemoryManager->__memmgrGetMaxContextSize__(pGpu, pMemoryManager); 1998 } 1999 2000 void memmgrScrubRegistryOverrides_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2001 2002 void memmgrScrubRegistryOverrides_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2003 2004 static inline void memmgrScrubRegistryOverrides_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2005 pMemoryManager->__memmgrScrubRegistryOverrides__(pGpu, pMemoryManager); 2006 } 2007 2008 NvU32 memmgrGetPteKindBl_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2009 2010 static inline NvU32 memmgrGetPteKindBl_474d46(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2011 NV_ASSERT_OR_RETURN_PRECOMP(0, 0); 2012 } 2013 2014 static inline NvU32 memmgrGetPteKindBl_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2015 return pMemoryManager->__memmgrGetPteKindBl__(pGpu, pMemoryManager); 2016 } 2017 2018 NvU32 memmgrGetPteKindPitch_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2019 2020 static inline NvU32 memmgrGetPteKindPitch_474d46(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2021 NV_ASSERT_OR_RETURN_PRECOMP(0, 0); 2022 } 2023 2024 static inline NvU32 memmgrGetPteKindPitch_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2025 return pMemoryManager->__memmgrGetPteKindPitch__(pGpu, pMemoryManager); 2026 } 2027 2028 NvU32 memmgrChooseKindCompressC_GP100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0); 2029 2030 static inline NvU32 memmgrChooseKindCompressC_474d46(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0) { 2031 NV_ASSERT_OR_RETURN_PRECOMP(0, 0); 2032 } 2033 2034 static inline NvU32 memmgrChooseKindCompressC_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_PAGE_FORMAT *arg0) { 2035 return pMemoryManager->__memmgrChooseKindCompressC__(pGpu, pMemoryManager, arg0); 2036 } 2037 2038 NV_STATUS memmgrGetFlaKind_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *arg0); 2039 2040 static inline NV_STATUS memmgrGetFlaKind_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *arg0) { 2041 return NV_ERR_NOT_SUPPORTED; 2042 } 2043 2044 static inline NV_STATUS memmgrGetFlaKind_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 *arg0) { 2045 return pMemoryManager->__memmgrGetFlaKind__(pGpu, pMemoryManager, arg0); 2046 } 2047 2048 NvBool memmgrIsApertureSupportedByFla_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0); 2049 2050 static inline NvBool memmgrIsApertureSupportedByFla_46f6a7(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0) { 2051 return NV_ERR_NOT_SUPPORTED; 2052 } 2053 2054 static inline NvBool memmgrIsApertureSupportedByFla_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0) { 2055 return pMemoryManager->__memmgrIsApertureSupportedByFla__(pGpu, pMemoryManager, arg0); 2056 } 2057 2058 NvU32 memmgrDetermineComptag_TU102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0); 2059 2060 static inline NvU32 memmgrDetermineComptag_13cd8d(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0) { 2061 NV_ASSERT_PRECOMP(0); 2062 return 0; 2063 } 2064 2065 static inline NvU32 memmgrDetermineComptag_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr arg0) { 2066 return pMemoryManager->__memmgrDetermineComptag__(pGpu, pMemoryManager, arg0); 2067 } 2068 2069 NV_STATUS memmgrCheckReservedMemorySize_GK104(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2070 2071 static inline NV_STATUS memmgrCheckReservedMemorySize_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2072 return NV_OK; 2073 } 2074 2075 static inline NV_STATUS memmgrCheckReservedMemorySize_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2076 return pMemoryManager->__memmgrCheckReservedMemorySize__(pGpu, pMemoryManager); 2077 } 2078 2079 NV_STATUS memmgrReadMmuLock_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool *pbIsValid, NvU64 *pMmuLockLo, NvU64 *pMmuLockHi); 2080 2081 static inline NV_STATUS memmgrReadMmuLock_e133c0(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool *pbIsValid, NvU64 *pMmuLockLo, NvU64 *pMmuLockHi) { 2082 *pbIsValid = ((NvBool)(0 != 0)); 2083 return NV_OK; 2084 } 2085 2086 static inline NV_STATUS memmgrReadMmuLock_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool *pbIsValid, NvU64 *pMmuLockLo, NvU64 *pMmuLockHi) { 2087 return pMemoryManager->__memmgrReadMmuLock__(pGpu, pMemoryManager, pbIsValid, pMmuLockLo, pMmuLockHi); 2088 } 2089 2090 NV_STATUS memmgrBlockMemLockedMemory_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2091 2092 static inline NV_STATUS memmgrBlockMemLockedMemory_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2093 return NV_OK; 2094 } 2095 2096 static inline NV_STATUS memmgrBlockMemLockedMemory_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2097 return pMemoryManager->__memmgrBlockMemLockedMemory__(pGpu, pMemoryManager); 2098 } 2099 2100 NV_STATUS memmgrInsertUnprotectedRegionAtBottomOfFb_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pSize); 2101 2102 static inline NV_STATUS memmgrInsertUnprotectedRegionAtBottomOfFb_56cd7a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pSize) { 2103 return NV_OK; 2104 } 2105 2106 static inline NV_STATUS memmgrInsertUnprotectedRegionAtBottomOfFb_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pSize) { 2107 return pMemoryManager->__memmgrInsertUnprotectedRegionAtBottomOfFb__(pGpu, pMemoryManager, pSize); 2108 } 2109 2110 void memmgrGetDisablePlcKind_GA100(struct MemoryManager *pMemoryManager, NvU32 *pteKind); 2111 2112 static inline void memmgrGetDisablePlcKind_b3696a(struct MemoryManager *pMemoryManager, NvU32 *pteKind) { 2113 return; 2114 } 2115 2116 static inline void memmgrGetDisablePlcKind_DISPATCH(struct MemoryManager *pMemoryManager, NvU32 *pteKind) { 2117 pMemoryManager->__memmgrGetDisablePlcKind__(pMemoryManager, pteKind); 2118 } 2119 2120 void memmgrEnableDynamicPageOfflining_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2121 2122 void memmgrEnableDynamicPageOfflining_GA102(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2123 2124 static inline void memmgrEnableDynamicPageOfflining_b3696a(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2125 return; 2126 } 2127 2128 static inline void memmgrEnableDynamicPageOfflining_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2129 pMemoryManager->__memmgrEnableDynamicPageOfflining__(pGpu, pMemoryManager); 2130 } 2131 2132 NV_STATUS memmgrGetBlackListPages_GM107(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, BLACKLIST_ADDRESS *pBlAddrs, NvU32 *pCount); 2133 2134 NV_STATUS memmgrGetBlackListPages_GA100(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, BLACKLIST_ADDRESS *pBlAddrs, NvU32 *pCount); 2135 2136 static inline NV_STATUS memmgrGetBlackListPages_DISPATCH(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, BLACKLIST_ADDRESS *pBlAddrs, NvU32 *pCount) { 2137 return pMemoryManager->__memmgrGetBlackListPages__(pGpu, pMemoryManager, pBlAddrs, pCount); 2138 } 2139 2140 static inline NV_STATUS memmgrStatePreLoad_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate, NvU32 arg0) { 2141 return pEngstate->__memmgrStatePreLoad__(pGpu, pEngstate, arg0); 2142 } 2143 2144 static inline NV_STATUS memmgrStatePostUnload_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate, NvU32 arg0) { 2145 return pEngstate->__memmgrStatePostUnload__(pGpu, pEngstate, arg0); 2146 } 2147 2148 static inline NV_STATUS memmgrStateInitUnlocked_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate) { 2149 return pEngstate->__memmgrStateInitUnlocked__(pGpu, pEngstate); 2150 } 2151 2152 static inline void memmgrInitMissing_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate) { 2153 pEngstate->__memmgrInitMissing__(pGpu, pEngstate); 2154 } 2155 2156 static inline NV_STATUS memmgrStatePreInitUnlocked_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate) { 2157 return pEngstate->__memmgrStatePreInitUnlocked__(pGpu, pEngstate); 2158 } 2159 2160 static inline NvBool memmgrIsPresent_DISPATCH(POBJGPU pGpu, struct MemoryManager *pEngstate) { 2161 return pEngstate->__memmgrIsPresent__(pGpu, pEngstate); 2162 } 2163 2164 static inline NvBool memmgrIsLocalEgmSupported(struct MemoryManager *pMemoryManager) { 2165 return pMemoryManager->bLocalEgmSupported; 2166 } 2167 2168 static inline NvBool memmgrIsLocalEgmEnabled(struct MemoryManager *pMemoryManager) { 2169 return pMemoryManager->bLocalEgmEnabled; 2170 } 2171 2172 static inline NvU32 memmgrLocalEgmPeerId(struct MemoryManager *pMemoryManager) { 2173 return pMemoryManager->localEgmPeerId; 2174 } 2175 2176 static inline NvBool memmgrIsScrubOnFreeEnabled(struct MemoryManager *pMemoryManager) { 2177 return pMemoryManager->bScrubOnFreeEnabled; 2178 } 2179 2180 static inline NvBool memmgrIsFastScrubberEnabled(struct MemoryManager *pMemoryManager) { 2181 return pMemoryManager->bFastScrubberEnabled; 2182 } 2183 2184 static inline NvBool memmgrUseVasForCeMemoryOps(struct MemoryManager *pMemoryManager) { 2185 return pMemoryManager->bUseVasForCeMemoryOps; 2186 } 2187 2188 static inline NvBool memmgrRmExecutingEccScrub(struct MemoryManager *pMemoryManager) { 2189 return pMemoryManager->bRmExecutingEccScrub; 2190 } 2191 2192 static inline NvBool memmgrBug1441072EccScrubWar(struct MemoryManager *pMemoryManager) { 2193 return pMemoryManager->bBug1441072EccScrubWar; 2194 } 2195 2196 static inline NvBool memmgrIsPmaInitialized(struct MemoryManager *pMemoryManager) { 2197 return pMemoryManager->bPmaInitialized; 2198 } 2199 2200 static inline void memmgrSetPmaInitialized(struct MemoryManager *pMemoryManager, NvBool val) { 2201 pMemoryManager->bPmaInitialized = val; 2202 } 2203 2204 static inline NvBool memmgrAreFbRegionsSupported(struct MemoryManager *pMemoryManager) { 2205 return pMemoryManager->bFbRegionsSupported; 2206 } 2207 2208 static inline NvBool memmgrIsPmaSupportedOnPlatform(struct MemoryManager *pMemoryManager) { 2209 return pMemoryManager->bPmaSupportedOnPlatform; 2210 } 2211 2212 static inline NvBool memmgrIsPmaEnabled(struct MemoryManager *pMemoryManager) { 2213 return pMemoryManager->bPmaEnabled; 2214 } 2215 2216 static inline NvBool memmgrIsPmaForcePersistence(struct MemoryManager *pMemoryManager) { 2217 return pMemoryManager->bPmaForcePersistence; 2218 } 2219 2220 static inline void memmgrSetPmaForcePersistence(struct MemoryManager *pMemoryManager, NvBool val) { 2221 pMemoryManager->bPmaForcePersistence = val; 2222 } 2223 2224 static inline NvBool memmgrAreClientPageTablesPmaManaged(struct MemoryManager *pMemoryManager) { 2225 return pMemoryManager->bClientPageTablesPmaManaged; 2226 } 2227 2228 static inline void memmgrSetClientPageTablesPmaManaged(struct MemoryManager *pMemoryManager, NvBool val) { 2229 pMemoryManager->bClientPageTablesPmaManaged = val; 2230 } 2231 2232 static inline NvBool memmgrIsPmaAddrTree(struct MemoryManager *pMemoryManager) { 2233 return pMemoryManager->bPmaAddrTree; 2234 } 2235 2236 static inline NvU64 memmgrGetRsvdMemoryBase(struct MemoryManager *pMemoryManager) { 2237 return pMemoryManager->rsvdMemoryBase; 2238 } 2239 2240 static inline NvU32 memmgrGetRsvdMemorySize(struct MemoryManager *pMemoryManager) { 2241 return pMemoryManager->rsvdMemorySize; 2242 } 2243 2244 static inline NvBool memmgrBug3922001DisableCtxBufOnSim(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2245 return pMemoryManager->bBug3922001DisableCtxBufOnSim; 2246 } 2247 2248 void memmgrDestruct_IMPL(struct MemoryManager *pMemoryManager); 2249 2250 #define __nvoc_memmgrDestruct(pMemoryManager) memmgrDestruct_IMPL(pMemoryManager) 2251 NV_STATUS memmgrAllocResources_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_ALLOCATION_REQUEST *pAllocRequest, FB_ALLOC_INFO *pFbAllocInfo); 2252 2253 #ifdef __nvoc_mem_mgr_h_disabled 2254 static inline NV_STATUS memmgrAllocResources(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_ALLOCATION_REQUEST *pAllocRequest, FB_ALLOC_INFO *pFbAllocInfo) { 2255 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2256 return NV_ERR_NOT_SUPPORTED; 2257 } 2258 #else //__nvoc_mem_mgr_h_disabled 2259 #define memmgrAllocResources(pGpu, pMemoryManager, pAllocRequest, pFbAllocInfo) memmgrAllocResources_IMPL(pGpu, pMemoryManager, pAllocRequest, pFbAllocInfo) 2260 #endif //__nvoc_mem_mgr_h_disabled 2261 2262 NV_STATUS memmgrFree_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *arg0, NvHandle arg1, NvHandle arg2, NvHandle arg3, NvU32 arg4, MEMORY_DESCRIPTOR *arg5); 2263 2264 #ifdef __nvoc_mem_mgr_h_disabled 2265 static inline NV_STATUS memmgrFree(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *arg0, NvHandle arg1, NvHandle arg2, NvHandle arg3, NvU32 arg4, MEMORY_DESCRIPTOR *arg5) { 2266 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2267 return NV_ERR_NOT_SUPPORTED; 2268 } 2269 #else //__nvoc_mem_mgr_h_disabled 2270 #define memmgrFree(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5) memmgrFree_IMPL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5) 2271 #endif //__nvoc_mem_mgr_h_disabled 2272 2273 NV_STATUS memmgrAddMemNode_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvBool bFreeDescriptor); 2274 2275 #ifdef __nvoc_mem_mgr_h_disabled 2276 static inline NV_STATUS memmgrAddMemNode(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvBool bFreeDescriptor) { 2277 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2278 return NV_ERR_NOT_SUPPORTED; 2279 } 2280 #else //__nvoc_mem_mgr_h_disabled 2281 #define memmgrAddMemNode(pGpu, pMemoryManager, pMemDesc, bFreeDescriptor) memmgrAddMemNode_IMPL(pGpu, pMemoryManager, pMemDesc, bFreeDescriptor) 2282 #endif //__nvoc_mem_mgr_h_disabled 2283 2284 NV_STATUS memmgrAddMemNodes_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool bSaveAllRmAllocations); 2285 2286 #ifdef __nvoc_mem_mgr_h_disabled 2287 static inline NV_STATUS memmgrAddMemNodes(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvBool bSaveAllRmAllocations) { 2288 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2289 return NV_ERR_NOT_SUPPORTED; 2290 } 2291 #else //__nvoc_mem_mgr_h_disabled 2292 #define memmgrAddMemNodes(pGpu, pMemoryManager, bSaveAllRmAllocations) memmgrAddMemNodes_IMPL(pGpu, pMemoryManager, bSaveAllRmAllocations) 2293 #endif //__nvoc_mem_mgr_h_disabled 2294 2295 void memmgrRemoveMemNodes_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2296 2297 #ifdef __nvoc_mem_mgr_h_disabled 2298 static inline void memmgrRemoveMemNodes(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2299 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2300 } 2301 #else //__nvoc_mem_mgr_h_disabled 2302 #define memmgrRemoveMemNodes(pGpu, pMemoryManager) memmgrRemoveMemNodes_IMPL(pGpu, pMemoryManager) 2303 #endif //__nvoc_mem_mgr_h_disabled 2304 2305 struct Heap *memmgrGetDeviceSuballocator_IMPL(struct MemoryManager *pMemoryManager, NvBool bForceSubheap); 2306 2307 #ifdef __nvoc_mem_mgr_h_disabled 2308 static inline struct Heap *memmgrGetDeviceSuballocator(struct MemoryManager *pMemoryManager, NvBool bForceSubheap) { 2309 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2310 return NULL; 2311 } 2312 #else //__nvoc_mem_mgr_h_disabled 2313 #define memmgrGetDeviceSuballocator(pMemoryManager, bForceSubheap) memmgrGetDeviceSuballocator_IMPL(pMemoryManager, bForceSubheap) 2314 #endif //__nvoc_mem_mgr_h_disabled 2315 2316 NV_STATUS memmgrMemCopy_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, TRANSFER_SURFACE *pSrc, NvU32 size, NvU32 flags); 2317 2318 #ifdef __nvoc_mem_mgr_h_disabled 2319 static inline NV_STATUS memmgrMemCopy(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, TRANSFER_SURFACE *pSrc, NvU32 size, NvU32 flags) { 2320 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2321 return NV_ERR_NOT_SUPPORTED; 2322 } 2323 #else //__nvoc_mem_mgr_h_disabled 2324 #define memmgrMemCopy(pMemoryManager, pDst, pSrc, size, flags) memmgrMemCopy_IMPL(pMemoryManager, pDst, pSrc, size, flags) 2325 #endif //__nvoc_mem_mgr_h_disabled 2326 2327 NV_STATUS memmgrMemSet_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, NvU32 value, NvU32 size, NvU32 flags); 2328 2329 #ifdef __nvoc_mem_mgr_h_disabled 2330 static inline NV_STATUS memmgrMemSet(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, NvU32 value, NvU32 size, NvU32 flags) { 2331 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2332 return NV_ERR_NOT_SUPPORTED; 2333 } 2334 #else //__nvoc_mem_mgr_h_disabled 2335 #define memmgrMemSet(pMemoryManager, pDst, value, size, flags) memmgrMemSet_IMPL(pMemoryManager, pDst, value, size, flags) 2336 #endif //__nvoc_mem_mgr_h_disabled 2337 2338 NV_STATUS memmgrMemWrite_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, void *pBuf, NvU64 size, NvU32 flags); 2339 2340 #ifdef __nvoc_mem_mgr_h_disabled 2341 static inline NV_STATUS memmgrMemWrite(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pDst, void *pBuf, NvU64 size, NvU32 flags) { 2342 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2343 return NV_ERR_NOT_SUPPORTED; 2344 } 2345 #else //__nvoc_mem_mgr_h_disabled 2346 #define memmgrMemWrite(pMemoryManager, pDst, pBuf, size, flags) memmgrMemWrite_IMPL(pMemoryManager, pDst, pBuf, size, flags) 2347 #endif //__nvoc_mem_mgr_h_disabled 2348 2349 NV_STATUS memmgrMemRead_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pSrc, void *pBuf, NvU64 size, NvU32 flags); 2350 2351 #ifdef __nvoc_mem_mgr_h_disabled 2352 static inline NV_STATUS memmgrMemRead(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pSrc, void *pBuf, NvU64 size, NvU32 flags) { 2353 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2354 return NV_ERR_NOT_SUPPORTED; 2355 } 2356 #else //__nvoc_mem_mgr_h_disabled 2357 #define memmgrMemRead(pMemoryManager, pSrc, pBuf, size, flags) memmgrMemRead_IMPL(pMemoryManager, pSrc, pBuf, size, flags) 2358 #endif //__nvoc_mem_mgr_h_disabled 2359 2360 NvU8 *memmgrMemBeginTransfer_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pTransferInfo, NvU64 shadowBufSize, NvU32 flags); 2361 2362 #ifdef __nvoc_mem_mgr_h_disabled 2363 static inline NvU8 *memmgrMemBeginTransfer(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pTransferInfo, NvU64 shadowBufSize, NvU32 flags) { 2364 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2365 return NULL; 2366 } 2367 #else //__nvoc_mem_mgr_h_disabled 2368 #define memmgrMemBeginTransfer(pMemoryManager, pTransferInfo, shadowBufSize, flags) memmgrMemBeginTransfer_IMPL(pMemoryManager, pTransferInfo, shadowBufSize, flags) 2369 #endif //__nvoc_mem_mgr_h_disabled 2370 2371 void memmgrMemEndTransfer_IMPL(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pTransferInfo, NvU64 shadowBufSize, NvU32 flags); 2372 2373 #ifdef __nvoc_mem_mgr_h_disabled 2374 static inline void memmgrMemEndTransfer(struct MemoryManager *pMemoryManager, TRANSFER_SURFACE *pTransferInfo, NvU64 shadowBufSize, NvU32 flags) { 2375 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2376 } 2377 #else //__nvoc_mem_mgr_h_disabled 2378 #define memmgrMemEndTransfer(pMemoryManager, pTransferInfo, shadowBufSize, flags) memmgrMemEndTransfer_IMPL(pMemoryManager, pTransferInfo, shadowBufSize, flags) 2379 #endif //__nvoc_mem_mgr_h_disabled 2380 2381 NvU8 *memmgrMemDescBeginTransfer_IMPL(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 flags); 2382 2383 #ifdef __nvoc_mem_mgr_h_disabled 2384 static inline NvU8 *memmgrMemDescBeginTransfer(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 flags) { 2385 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2386 return NULL; 2387 } 2388 #else //__nvoc_mem_mgr_h_disabled 2389 #define memmgrMemDescBeginTransfer(pMemoryManager, pMemDesc, flags) memmgrMemDescBeginTransfer_IMPL(pMemoryManager, pMemDesc, flags) 2390 #endif //__nvoc_mem_mgr_h_disabled 2391 2392 void memmgrMemDescEndTransfer_IMPL(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 flags); 2393 2394 #ifdef __nvoc_mem_mgr_h_disabled 2395 static inline void memmgrMemDescEndTransfer(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 flags) { 2396 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2397 } 2398 #else //__nvoc_mem_mgr_h_disabled 2399 #define memmgrMemDescEndTransfer(pMemoryManager, pMemDesc, flags) memmgrMemDescEndTransfer_IMPL(pMemoryManager, pMemDesc, flags) 2400 #endif //__nvoc_mem_mgr_h_disabled 2401 2402 NV_STATUS memmgrMemDescMemSet_IMPL(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 value, NvU32 flags); 2403 2404 #ifdef __nvoc_mem_mgr_h_disabled 2405 static inline NV_STATUS memmgrMemDescMemSet(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *pMemDesc, NvU32 value, NvU32 flags) { 2406 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2407 return NV_ERR_NOT_SUPPORTED; 2408 } 2409 #else //__nvoc_mem_mgr_h_disabled 2410 #define memmgrMemDescMemSet(pMemoryManager, pMemDesc, value, flags) memmgrMemDescMemSet_IMPL(pMemoryManager, pMemDesc, value, flags) 2411 #endif //__nvoc_mem_mgr_h_disabled 2412 2413 NV_ADDRESS_SPACE memmgrAllocGetAddrSpace_IMPL(struct MemoryManager *pMemoryManager, NvU32 flags, NvU32 attr); 2414 2415 #ifdef __nvoc_mem_mgr_h_disabled 2416 static inline NV_ADDRESS_SPACE memmgrAllocGetAddrSpace(struct MemoryManager *pMemoryManager, NvU32 flags, NvU32 attr) { 2417 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2418 NV_ADDRESS_SPACE ret; 2419 portMemSet(&ret, 0, sizeof(NV_ADDRESS_SPACE)); 2420 return ret; 2421 } 2422 #else //__nvoc_mem_mgr_h_disabled 2423 #define memmgrAllocGetAddrSpace(pMemoryManager, flags, attr) memmgrAllocGetAddrSpace_IMPL(pMemoryManager, flags, attr) 2424 #endif //__nvoc_mem_mgr_h_disabled 2425 2426 NV_STATUS memmgrCreateHeap_IMPL(struct MemoryManager *pMemoryManager); 2427 2428 #ifdef __nvoc_mem_mgr_h_disabled 2429 static inline NV_STATUS memmgrCreateHeap(struct MemoryManager *pMemoryManager) { 2430 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2431 return NV_ERR_NOT_SUPPORTED; 2432 } 2433 #else //__nvoc_mem_mgr_h_disabled 2434 #define memmgrCreateHeap(pMemoryManager) memmgrCreateHeap_IMPL(pMemoryManager) 2435 #endif //__nvoc_mem_mgr_h_disabled 2436 2437 NV_STATUS memmgrGetUsedRamSize_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0); 2438 2439 #ifdef __nvoc_mem_mgr_h_disabled 2440 static inline NV_STATUS memmgrGetUsedRamSize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0) { 2441 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2442 return NV_ERR_NOT_SUPPORTED; 2443 } 2444 #else //__nvoc_mem_mgr_h_disabled 2445 #define memmgrGetUsedRamSize(pGpu, pMemoryManager, arg0) memmgrGetUsedRamSize_IMPL(pGpu, pMemoryManager, arg0) 2446 #endif //__nvoc_mem_mgr_h_disabled 2447 2448 NV_STATUS memmgrAllocHwResources_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0); 2449 2450 #ifdef __nvoc_mem_mgr_h_disabled 2451 static inline NV_STATUS memmgrAllocHwResources(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0) { 2452 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2453 return NV_ERR_NOT_SUPPORTED; 2454 } 2455 #else //__nvoc_mem_mgr_h_disabled 2456 #define memmgrAllocHwResources(pGpu, pMemoryManager, arg0) memmgrAllocHwResources_IMPL(pGpu, pMemoryManager, arg0) 2457 #endif //__nvoc_mem_mgr_h_disabled 2458 2459 NV_STATUS memmgrFreeHwResources_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0); 2460 2461 #ifdef __nvoc_mem_mgr_h_disabled 2462 static inline NV_STATUS memmgrFreeHwResources(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, FB_ALLOC_INFO *arg0) { 2463 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2464 return NV_ERR_NOT_SUPPORTED; 2465 } 2466 #else //__nvoc_mem_mgr_h_disabled 2467 #define memmgrFreeHwResources(pGpu, pMemoryManager, arg0) memmgrFreeHwResources_IMPL(pGpu, pMemoryManager, arg0) 2468 #endif //__nvoc_mem_mgr_h_disabled 2469 2470 NvBool memmgrLargePageSupported_IMPL(struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0); 2471 2472 #ifdef __nvoc_mem_mgr_h_disabled 2473 static inline NvBool memmgrLargePageSupported(struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0) { 2474 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2475 return NV_FALSE; 2476 } 2477 #else //__nvoc_mem_mgr_h_disabled 2478 #define memmgrLargePageSupported(pMemoryManager, arg0) memmgrLargePageSupported_IMPL(pMemoryManager, arg0) 2479 #endif //__nvoc_mem_mgr_h_disabled 2480 2481 NvBool memmgrComprSupported_IMPL(struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0); 2482 2483 #ifdef __nvoc_mem_mgr_h_disabled 2484 static inline NvBool memmgrComprSupported(struct MemoryManager *pMemoryManager, NV_ADDRESS_SPACE arg0) { 2485 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2486 return NV_FALSE; 2487 } 2488 #else //__nvoc_mem_mgr_h_disabled 2489 #define memmgrComprSupported(pMemoryManager, arg0) memmgrComprSupported_IMPL(pMemoryManager, arg0) 2490 #endif //__nvoc_mem_mgr_h_disabled 2491 2492 NvU32 memmgrGetMappableRamSizeMb_IMPL(struct MemoryManager *pMemoryManager); 2493 2494 #ifdef __nvoc_mem_mgr_h_disabled 2495 static inline NvU32 memmgrGetMappableRamSizeMb(struct MemoryManager *pMemoryManager) { 2496 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2497 return 0; 2498 } 2499 #else //__nvoc_mem_mgr_h_disabled 2500 #define memmgrGetMappableRamSizeMb(pMemoryManager) memmgrGetMappableRamSizeMb_IMPL(pMemoryManager) 2501 #endif //__nvoc_mem_mgr_h_disabled 2502 2503 PFB_REGION_DESCRIPTOR memmgrLookupFbRegionByOffset_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr fbOffset, RmPhysAddr fbLimit); 2504 2505 #ifdef __nvoc_mem_mgr_h_disabled 2506 static inline PFB_REGION_DESCRIPTOR memmgrLookupFbRegionByOffset(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, RmPhysAddr fbOffset, RmPhysAddr fbLimit) { 2507 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2508 return NULL; 2509 } 2510 #else //__nvoc_mem_mgr_h_disabled 2511 #define memmgrLookupFbRegionByOffset(pGpu, pMemoryManager, fbOffset, fbLimit) memmgrLookupFbRegionByOffset_IMPL(pGpu, pMemoryManager, fbOffset, fbLimit) 2512 #endif //__nvoc_mem_mgr_h_disabled 2513 2514 NV_STATUS memmgrFillMemdescForPhysAttr_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMEMORY_DESCRIPTOR arg0, ADDRESS_TRANSLATION arg1, NvU64 *arg2, NvU32 *arg3, NvU32 *arg4, NvU32 *arg5, NvU32 *arg6, NvU32 *arg7, NvU64 *arg8); 2515 2516 #ifdef __nvoc_mem_mgr_h_disabled 2517 static inline NV_STATUS memmgrFillMemdescForPhysAttr(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMEMORY_DESCRIPTOR arg0, ADDRESS_TRANSLATION arg1, NvU64 *arg2, NvU32 *arg3, NvU32 *arg4, NvU32 *arg5, NvU32 *arg6, NvU32 *arg7, NvU64 *arg8) { 2518 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2519 return NV_ERR_NOT_SUPPORTED; 2520 } 2521 #else //__nvoc_mem_mgr_h_disabled 2522 #define memmgrFillMemdescForPhysAttr(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) memmgrFillMemdescForPhysAttr_IMPL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) 2523 #endif //__nvoc_mem_mgr_h_disabled 2524 2525 NV_STATUS memmgrSetPlatformPmaSupport_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2526 2527 #ifdef __nvoc_mem_mgr_h_disabled 2528 static inline NV_STATUS memmgrSetPlatformPmaSupport(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2529 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2530 return NV_ERR_NOT_SUPPORTED; 2531 } 2532 #else //__nvoc_mem_mgr_h_disabled 2533 #define memmgrSetPlatformPmaSupport(pGpu, pMemoryManager) memmgrSetPlatformPmaSupport_IMPL(pGpu, pMemoryManager) 2534 #endif //__nvoc_mem_mgr_h_disabled 2535 2536 void memmgrRegionSetupForPma_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2537 2538 #ifdef __nvoc_mem_mgr_h_disabled 2539 static inline void memmgrRegionSetupForPma(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2540 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2541 } 2542 #else //__nvoc_mem_mgr_h_disabled 2543 #define memmgrRegionSetupForPma(pGpu, pMemoryManager) memmgrRegionSetupForPma_IMPL(pGpu, pMemoryManager) 2544 #endif //__nvoc_mem_mgr_h_disabled 2545 2546 NV_STATUS memmgrInitFbRegions_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2547 2548 #ifdef __nvoc_mem_mgr_h_disabled 2549 static inline NV_STATUS memmgrInitFbRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2550 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2551 return NV_ERR_NOT_SUPPORTED; 2552 } 2553 #else //__nvoc_mem_mgr_h_disabled 2554 #define memmgrInitFbRegions(pGpu, pMemoryManager) memmgrInitFbRegions_IMPL(pGpu, pMemoryManager) 2555 #endif //__nvoc_mem_mgr_h_disabled 2556 2557 void memmgrRegionSetupCommon_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2558 2559 #ifdef __nvoc_mem_mgr_h_disabled 2560 static inline void memmgrRegionSetupCommon(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2561 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2562 } 2563 #else //__nvoc_mem_mgr_h_disabled 2564 #define memmgrRegionSetupCommon(pGpu, pMemoryManager) memmgrRegionSetupCommon_IMPL(pGpu, pMemoryManager) 2565 #endif //__nvoc_mem_mgr_h_disabled 2566 2567 void memmgrRegenerateFbRegionPriority_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2568 2569 #ifdef __nvoc_mem_mgr_h_disabled 2570 static inline void memmgrRegenerateFbRegionPriority(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2571 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2572 } 2573 #else //__nvoc_mem_mgr_h_disabled 2574 #define memmgrRegenerateFbRegionPriority(pGpu, pMemoryManager) memmgrRegenerateFbRegionPriority_IMPL(pGpu, pMemoryManager) 2575 #endif //__nvoc_mem_mgr_h_disabled 2576 2577 NvU32 memmgrInsertFbRegion_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PFB_REGION_DESCRIPTOR arg0); 2578 2579 #ifdef __nvoc_mem_mgr_h_disabled 2580 static inline NvU32 memmgrInsertFbRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PFB_REGION_DESCRIPTOR arg0) { 2581 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2582 return 0; 2583 } 2584 #else //__nvoc_mem_mgr_h_disabled 2585 #define memmgrInsertFbRegion(pGpu, pMemoryManager, arg0) memmgrInsertFbRegion_IMPL(pGpu, pMemoryManager, arg0) 2586 #endif //__nvoc_mem_mgr_h_disabled 2587 2588 void memmgrDumpFbRegions_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2589 2590 #ifdef __nvoc_mem_mgr_h_disabled 2591 static inline void memmgrDumpFbRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2592 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2593 } 2594 #else //__nvoc_mem_mgr_h_disabled 2595 #define memmgrDumpFbRegions(pGpu, pMemoryManager) memmgrDumpFbRegions_IMPL(pGpu, pMemoryManager) 2596 #endif //__nvoc_mem_mgr_h_disabled 2597 2598 void memmgrClearFbRegions_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2599 2600 #ifdef __nvoc_mem_mgr_h_disabled 2601 static inline void memmgrClearFbRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2602 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2603 } 2604 #else //__nvoc_mem_mgr_h_disabled 2605 #define memmgrClearFbRegions(pGpu, pMemoryManager) memmgrClearFbRegions_IMPL(pGpu, pMemoryManager) 2606 #endif //__nvoc_mem_mgr_h_disabled 2607 2608 void memmgrReleaseConsoleRegion_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2609 2610 #ifdef __nvoc_mem_mgr_h_disabled 2611 static inline void memmgrReleaseConsoleRegion(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2612 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2613 } 2614 #else //__nvoc_mem_mgr_h_disabled 2615 #define memmgrReleaseConsoleRegion(pGpu, pMemoryManager) memmgrReleaseConsoleRegion_IMPL(pGpu, pMemoryManager) 2616 #endif //__nvoc_mem_mgr_h_disabled 2617 2618 PMEMORY_DESCRIPTOR memmgrGetReservedConsoleMemDesc_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2619 2620 #ifdef __nvoc_mem_mgr_h_disabled 2621 static inline PMEMORY_DESCRIPTOR memmgrGetReservedConsoleMemDesc(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2622 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2623 return NULL; 2624 } 2625 #else //__nvoc_mem_mgr_h_disabled 2626 #define memmgrGetReservedConsoleMemDesc(pGpu, pMemoryManager) memmgrGetReservedConsoleMemDesc_IMPL(pGpu, pMemoryManager) 2627 #endif //__nvoc_mem_mgr_h_disabled 2628 2629 void memmgrReserveBar2BackingStore_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0); 2630 2631 #ifdef __nvoc_mem_mgr_h_disabled 2632 static inline void memmgrReserveBar2BackingStore(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *arg0) { 2633 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2634 } 2635 #else //__nvoc_mem_mgr_h_disabled 2636 #define memmgrReserveBar2BackingStore(pGpu, pMemoryManager, arg0) memmgrReserveBar2BackingStore_IMPL(pGpu, pMemoryManager, arg0) 2637 #endif //__nvoc_mem_mgr_h_disabled 2638 2639 void memmgrCalcReservedFbSpace_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2640 2641 #ifdef __nvoc_mem_mgr_h_disabled 2642 static inline void memmgrCalcReservedFbSpace(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2643 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2644 } 2645 #else //__nvoc_mem_mgr_h_disabled 2646 #define memmgrCalcReservedFbSpace(pGpu, pMemoryManager) memmgrCalcReservedFbSpace_IMPL(pGpu, pMemoryManager) 2647 #endif //__nvoc_mem_mgr_h_disabled 2648 2649 void memmgrMemUtilsSetupChannelBufferSizes_IMPL(struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, NvU32 arg1); 2650 2651 #ifdef __nvoc_mem_mgr_h_disabled 2652 static inline void memmgrMemUtilsSetupChannelBufferSizes(struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0, NvU32 arg1) { 2653 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2654 } 2655 #else //__nvoc_mem_mgr_h_disabled 2656 #define memmgrMemUtilsSetupChannelBufferSizes(pMemoryManager, arg0, arg1) memmgrMemUtilsSetupChannelBufferSizes_IMPL(pMemoryManager, arg0, arg1) 2657 #endif //__nvoc_mem_mgr_h_disabled 2658 2659 NV_STATUS memmgrMemUtilsChannelSchedulingSetup_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0); 2660 2661 #ifdef __nvoc_mem_mgr_h_disabled 2662 static inline NV_STATUS memmgrMemUtilsChannelSchedulingSetup(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, OBJCHANNEL *arg0) { 2663 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2664 return NV_ERR_NOT_SUPPORTED; 2665 } 2666 #else //__nvoc_mem_mgr_h_disabled 2667 #define memmgrMemUtilsChannelSchedulingSetup(pGpu, pMemoryManager, arg0) memmgrMemUtilsChannelSchedulingSetup_IMPL(pGpu, pMemoryManager, arg0) 2668 #endif //__nvoc_mem_mgr_h_disabled 2669 2670 NV_STATUS memmgrGetKindComprFromMemDesc_IMPL(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *arg0, NvU64 offset, NvU32 *kind, COMPR_INFO *pComprInfo); 2671 2672 #ifdef __nvoc_mem_mgr_h_disabled 2673 static inline NV_STATUS memmgrGetKindComprFromMemDesc(struct MemoryManager *pMemoryManager, MEMORY_DESCRIPTOR *arg0, NvU64 offset, NvU32 *kind, COMPR_INFO *pComprInfo) { 2674 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2675 return NV_ERR_NOT_SUPPORTED; 2676 } 2677 #else //__nvoc_mem_mgr_h_disabled 2678 #define memmgrGetKindComprFromMemDesc(pMemoryManager, arg0, offset, kind, pComprInfo) memmgrGetKindComprFromMemDesc_IMPL(pMemoryManager, arg0, offset, kind, pComprInfo) 2679 #endif //__nvoc_mem_mgr_h_disabled 2680 2681 NV_STATUS memmgrFillComprInfo_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0, NvU32 arg1, NvU32 arg2, NvU64 arg3, NvU32 arg4, COMPR_INFO *arg5); 2682 2683 #ifdef __nvoc_mem_mgr_h_disabled 2684 static inline NV_STATUS memmgrFillComprInfo(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 arg0, NvU32 arg1, NvU32 arg2, NvU64 arg3, NvU32 arg4, COMPR_INFO *arg5) { 2685 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2686 return NV_ERR_NOT_SUPPORTED; 2687 } 2688 #else //__nvoc_mem_mgr_h_disabled 2689 #define memmgrFillComprInfo(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5) memmgrFillComprInfo_IMPL(pGpu, pMemoryManager, arg0, arg1, arg2, arg3, arg4, arg5) 2690 #endif //__nvoc_mem_mgr_h_disabled 2691 2692 void memmgrComprInfoDisableCompression_IMPL(struct MemoryManager *pMemoryManager, COMPR_INFO *pComprInfo); 2693 2694 #ifdef __nvoc_mem_mgr_h_disabled 2695 static inline void memmgrComprInfoDisableCompression(struct MemoryManager *pMemoryManager, COMPR_INFO *pComprInfo) { 2696 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2697 } 2698 #else //__nvoc_mem_mgr_h_disabled 2699 #define memmgrComprInfoDisableCompression(pMemoryManager, pComprInfo) memmgrComprInfoDisableCompression_IMPL(pMemoryManager, pComprInfo) 2700 #endif //__nvoc_mem_mgr_h_disabled 2701 2702 void memmgrFillComprInfoUncompressed_IMPL(struct MemoryManager *pMemoryManager, NvU32 kind, COMPR_INFO *pComprInfo); 2703 2704 #ifdef __nvoc_mem_mgr_h_disabled 2705 static inline void memmgrFillComprInfoUncompressed(struct MemoryManager *pMemoryManager, NvU32 kind, COMPR_INFO *pComprInfo) { 2706 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2707 } 2708 #else //__nvoc_mem_mgr_h_disabled 2709 #define memmgrFillComprInfoUncompressed(pMemoryManager, kind, pComprInfo) memmgrFillComprInfoUncompressed_IMPL(pMemoryManager, kind, pComprInfo) 2710 #endif //__nvoc_mem_mgr_h_disabled 2711 2712 NV_STATUS memmgrPmaInitialize_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMA *pPma); 2713 2714 #ifdef __nvoc_mem_mgr_h_disabled 2715 static inline NV_STATUS memmgrPmaInitialize(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, PMA *pPma) { 2716 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2717 return NV_ERR_NOT_SUPPORTED; 2718 } 2719 #else //__nvoc_mem_mgr_h_disabled 2720 #define memmgrPmaInitialize(pGpu, pMemoryManager, pPma) memmgrPmaInitialize_IMPL(pGpu, pMemoryManager, pPma) 2721 #endif //__nvoc_mem_mgr_h_disabled 2722 2723 NV_STATUS memmgrPmaRegisterRegions_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *pHeap, PMA *pPma); 2724 2725 #ifdef __nvoc_mem_mgr_h_disabled 2726 static inline NV_STATUS memmgrPmaRegisterRegions(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Heap *pHeap, PMA *pPma) { 2727 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2728 return NV_ERR_NOT_SUPPORTED; 2729 } 2730 #else //__nvoc_mem_mgr_h_disabled 2731 #define memmgrPmaRegisterRegions(pGpu, pMemoryManager, pHeap, pPma) memmgrPmaRegisterRegions_IMPL(pGpu, pMemoryManager, pHeap, pPma) 2732 #endif //__nvoc_mem_mgr_h_disabled 2733 2734 NV_STATUS memmgrInitInternalChannels_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2735 2736 #ifdef __nvoc_mem_mgr_h_disabled 2737 static inline NV_STATUS memmgrInitInternalChannels(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2738 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2739 return NV_ERR_NOT_SUPPORTED; 2740 } 2741 #else //__nvoc_mem_mgr_h_disabled 2742 #define memmgrInitInternalChannels(pGpu, pMemoryManager) memmgrInitInternalChannels_IMPL(pGpu, pMemoryManager) 2743 #endif //__nvoc_mem_mgr_h_disabled 2744 2745 NV_STATUS memmgrDestroyInternalChannels_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2746 2747 #ifdef __nvoc_mem_mgr_h_disabled 2748 static inline NV_STATUS memmgrDestroyInternalChannels(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2749 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2750 return NV_ERR_NOT_SUPPORTED; 2751 } 2752 #else //__nvoc_mem_mgr_h_disabled 2753 #define memmgrDestroyInternalChannels(pGpu, pMemoryManager) memmgrDestroyInternalChannels_IMPL(pGpu, pMemoryManager) 2754 #endif //__nvoc_mem_mgr_h_disabled 2755 2756 NV_STATUS memmgrInitCeUtils_IMPL(struct MemoryManager *pMemoryManager, NvBool bFifoLite); 2757 2758 #ifdef __nvoc_mem_mgr_h_disabled 2759 static inline NV_STATUS memmgrInitCeUtils(struct MemoryManager *pMemoryManager, NvBool bFifoLite) { 2760 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2761 return NV_ERR_NOT_SUPPORTED; 2762 } 2763 #else //__nvoc_mem_mgr_h_disabled 2764 #define memmgrInitCeUtils(pMemoryManager, bFifoLite) memmgrInitCeUtils_IMPL(pMemoryManager, bFifoLite) 2765 #endif //__nvoc_mem_mgr_h_disabled 2766 2767 void memmgrDestroyCeUtils_IMPL(struct MemoryManager *pMemoryManager, NvBool bSuspendCeUtils); 2768 2769 #ifdef __nvoc_mem_mgr_h_disabled 2770 static inline void memmgrDestroyCeUtils(struct MemoryManager *pMemoryManager, NvBool bSuspendCeUtils) { 2771 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2772 } 2773 #else //__nvoc_mem_mgr_h_disabled 2774 #define memmgrDestroyCeUtils(pMemoryManager, bSuspendCeUtils) memmgrDestroyCeUtils_IMPL(pMemoryManager, bSuspendCeUtils) 2775 #endif //__nvoc_mem_mgr_h_disabled 2776 2777 NV_STATUS memmgrSetMIGPartitionableBAR1Range_IMPL(OBJGPU *arg0, struct MemoryManager *arg1); 2778 2779 #ifdef __nvoc_mem_mgr_h_disabled 2780 static inline NV_STATUS memmgrSetMIGPartitionableBAR1Range(OBJGPU *arg0, struct MemoryManager *arg1) { 2781 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2782 return NV_ERR_NOT_SUPPORTED; 2783 } 2784 #else //__nvoc_mem_mgr_h_disabled 2785 #define memmgrSetMIGPartitionableBAR1Range(arg0, arg1) memmgrSetMIGPartitionableBAR1Range_IMPL(arg0, arg1) 2786 #endif //__nvoc_mem_mgr_h_disabled 2787 2788 struct NV_RANGE memmgrGetMIGPartitionableBAR1Range_IMPL(OBJGPU *arg0, struct MemoryManager *arg1); 2789 2790 #ifdef __nvoc_mem_mgr_h_disabled 2791 static inline struct NV_RANGE memmgrGetMIGPartitionableBAR1Range(OBJGPU *arg0, struct MemoryManager *arg1) { 2792 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2793 struct NV_RANGE ret; 2794 portMemSet(&ret, 0, sizeof(struct NV_RANGE)); 2795 return ret; 2796 } 2797 #else //__nvoc_mem_mgr_h_disabled 2798 #define memmgrGetMIGPartitionableBAR1Range(arg0, arg1) memmgrGetMIGPartitionableBAR1Range_IMPL(arg0, arg1) 2799 #endif //__nvoc_mem_mgr_h_disabled 2800 2801 void memmgrSetMIGPartitionableMemoryRange_IMPL(OBJGPU *arg0, struct MemoryManager *arg1, struct NV_RANGE arg2); 2802 2803 #ifdef __nvoc_mem_mgr_h_disabled 2804 static inline void memmgrSetMIGPartitionableMemoryRange(OBJGPU *arg0, struct MemoryManager *arg1, struct NV_RANGE arg2) { 2805 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2806 } 2807 #else //__nvoc_mem_mgr_h_disabled 2808 #define memmgrSetMIGPartitionableMemoryRange(arg0, arg1, arg2) memmgrSetMIGPartitionableMemoryRange_IMPL(arg0, arg1, arg2) 2809 #endif //__nvoc_mem_mgr_h_disabled 2810 2811 struct NV_RANGE memmgrGetMIGPartitionableMemoryRange_IMPL(OBJGPU *arg0, struct MemoryManager *arg1); 2812 2813 #ifdef __nvoc_mem_mgr_h_disabled 2814 static inline struct NV_RANGE memmgrGetMIGPartitionableMemoryRange(OBJGPU *arg0, struct MemoryManager *arg1) { 2815 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2816 struct NV_RANGE ret; 2817 portMemSet(&ret, 0, sizeof(struct NV_RANGE)); 2818 return ret; 2819 } 2820 #else //__nvoc_mem_mgr_h_disabled 2821 #define memmgrGetMIGPartitionableMemoryRange(arg0, arg1) memmgrGetMIGPartitionableMemoryRange_IMPL(arg0, arg1) 2822 #endif //__nvoc_mem_mgr_h_disabled 2823 2824 NV_STATUS memmgrFreeMIGGPUInstanceMemory_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 swizzId, NvHandle hMemory, struct Heap **ppMemoryPartitionHeap); 2825 2826 #ifdef __nvoc_mem_mgr_h_disabled 2827 static inline NV_STATUS memmgrFreeMIGGPUInstanceMemory(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU32 swizzId, NvHandle hMemory, struct Heap **ppMemoryPartitionHeap) { 2828 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2829 return NV_ERR_NOT_SUPPORTED; 2830 } 2831 #else //__nvoc_mem_mgr_h_disabled 2832 #define memmgrFreeMIGGPUInstanceMemory(pGpu, pMemoryManager, swizzId, hMemory, ppMemoryPartitionHeap) memmgrFreeMIGGPUInstanceMemory_IMPL(pGpu, pMemoryManager, swizzId, hMemory, ppMemoryPartitionHeap) 2833 #endif //__nvoc_mem_mgr_h_disabled 2834 2835 NV_STATUS memmgrPageLevelPoolsCreate_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2836 2837 #ifdef __nvoc_mem_mgr_h_disabled 2838 static inline NV_STATUS memmgrPageLevelPoolsCreate(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2839 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2840 return NV_ERR_NOT_SUPPORTED; 2841 } 2842 #else //__nvoc_mem_mgr_h_disabled 2843 #define memmgrPageLevelPoolsCreate(pGpu, pMemoryManager) memmgrPageLevelPoolsCreate_IMPL(pGpu, pMemoryManager) 2844 #endif //__nvoc_mem_mgr_h_disabled 2845 2846 void memmgrPageLevelPoolsDestroy_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2847 2848 #ifdef __nvoc_mem_mgr_h_disabled 2849 static inline void memmgrPageLevelPoolsDestroy(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2850 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2851 } 2852 #else //__nvoc_mem_mgr_h_disabled 2853 #define memmgrPageLevelPoolsDestroy(pGpu, pMemoryManager) memmgrPageLevelPoolsDestroy_IMPL(pGpu, pMemoryManager) 2854 #endif //__nvoc_mem_mgr_h_disabled 2855 2856 NV_STATUS memmgrPageLevelPoolsGetInfo_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Device *pDevice, struct RM_POOL_ALLOC_MEM_RESERVE_INFO **arg0); 2857 2858 #ifdef __nvoc_mem_mgr_h_disabled 2859 static inline NV_STATUS memmgrPageLevelPoolsGetInfo(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, struct Device *pDevice, struct RM_POOL_ALLOC_MEM_RESERVE_INFO **arg0) { 2860 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2861 return NV_ERR_NOT_SUPPORTED; 2862 } 2863 #else //__nvoc_mem_mgr_h_disabled 2864 #define memmgrPageLevelPoolsGetInfo(pGpu, pMemoryManager, pDevice, arg0) memmgrPageLevelPoolsGetInfo_IMPL(pGpu, pMemoryManager, pDevice, arg0) 2865 #endif //__nvoc_mem_mgr_h_disabled 2866 2867 NV_STATUS memmgrAllocMIGMemoryAllocationInternalHandles_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2868 2869 #ifdef __nvoc_mem_mgr_h_disabled 2870 static inline NV_STATUS memmgrAllocMIGMemoryAllocationInternalHandles(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2871 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2872 return NV_ERR_NOT_SUPPORTED; 2873 } 2874 #else //__nvoc_mem_mgr_h_disabled 2875 #define memmgrAllocMIGMemoryAllocationInternalHandles(pGpu, pMemoryManager) memmgrAllocMIGMemoryAllocationInternalHandles_IMPL(pGpu, pMemoryManager) 2876 #endif //__nvoc_mem_mgr_h_disabled 2877 2878 void memmgrFreeMIGMemoryAllocationInternalHandles_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2879 2880 #ifdef __nvoc_mem_mgr_h_disabled 2881 static inline void memmgrFreeMIGMemoryAllocationInternalHandles(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2882 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2883 } 2884 #else //__nvoc_mem_mgr_h_disabled 2885 #define memmgrFreeMIGMemoryAllocationInternalHandles(pGpu, pMemoryManager) memmgrFreeMIGMemoryAllocationInternalHandles_IMPL(pGpu, pMemoryManager) 2886 #endif //__nvoc_mem_mgr_h_disabled 2887 2888 void memmgrGetFreeMemoryForAllMIGGPUInstances_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pBytes); 2889 2890 #ifdef __nvoc_mem_mgr_h_disabled 2891 static inline void memmgrGetFreeMemoryForAllMIGGPUInstances(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pBytes) { 2892 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2893 } 2894 #else //__nvoc_mem_mgr_h_disabled 2895 #define memmgrGetFreeMemoryForAllMIGGPUInstances(pGpu, pMemoryManager, pBytes) memmgrGetFreeMemoryForAllMIGGPUInstances_IMPL(pGpu, pMemoryManager, pBytes) 2896 #endif //__nvoc_mem_mgr_h_disabled 2897 2898 void memmgrGetTotalMemoryForAllMIGGPUInstances_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pBytes); 2899 2900 #ifdef __nvoc_mem_mgr_h_disabled 2901 static inline void memmgrGetTotalMemoryForAllMIGGPUInstances(OBJGPU *pGpu, struct MemoryManager *pMemoryManager, NvU64 *pBytes) { 2902 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2903 } 2904 #else //__nvoc_mem_mgr_h_disabled 2905 #define memmgrGetTotalMemoryForAllMIGGPUInstances(pGpu, pMemoryManager, pBytes) memmgrGetTotalMemoryForAllMIGGPUInstances_IMPL(pGpu, pMemoryManager, pBytes) 2906 #endif //__nvoc_mem_mgr_h_disabled 2907 2908 void memmgrGetTopLevelScrubberStatus_IMPL(OBJGPU *arg0, struct MemoryManager *arg1, NvBool *pbTopLevelScrubberEnabled, NvBool *pbTopLevelScrubberConstructed); 2909 2910 #ifdef __nvoc_mem_mgr_h_disabled 2911 static inline void memmgrGetTopLevelScrubberStatus(OBJGPU *arg0, struct MemoryManager *arg1, NvBool *pbTopLevelScrubberEnabled, NvBool *pbTopLevelScrubberConstructed) { 2912 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2913 } 2914 #else //__nvoc_mem_mgr_h_disabled 2915 #define memmgrGetTopLevelScrubberStatus(arg0, arg1, pbTopLevelScrubberEnabled, pbTopLevelScrubberConstructed) memmgrGetTopLevelScrubberStatus_IMPL(arg0, arg1, pbTopLevelScrubberEnabled, pbTopLevelScrubberConstructed) 2916 #endif //__nvoc_mem_mgr_h_disabled 2917 2918 MEMORY_DESCRIPTOR *memmgrMemUtilsGetMemDescFromHandle_IMPL(struct MemoryManager *pMemoryManager, NvHandle hClient, NvHandle hMemory); 2919 2920 #ifdef __nvoc_mem_mgr_h_disabled 2921 static inline MEMORY_DESCRIPTOR *memmgrMemUtilsGetMemDescFromHandle(struct MemoryManager *pMemoryManager, NvHandle hClient, NvHandle hMemory) { 2922 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2923 return NULL; 2924 } 2925 #else //__nvoc_mem_mgr_h_disabled 2926 #define memmgrMemUtilsGetMemDescFromHandle(pMemoryManager, hClient, hMemory) memmgrMemUtilsGetMemDescFromHandle_IMPL(pMemoryManager, hClient, hMemory) 2927 #endif //__nvoc_mem_mgr_h_disabled 2928 2929 NV_STATUS memmgrVerifyGspDmaOps_IMPL(OBJGPU *arg0, struct MemoryManager *arg1); 2930 2931 #ifdef __nvoc_mem_mgr_h_disabled 2932 static inline NV_STATUS memmgrVerifyGspDmaOps(OBJGPU *arg0, struct MemoryManager *arg1) { 2933 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2934 return NV_ERR_NOT_SUPPORTED; 2935 } 2936 #else //__nvoc_mem_mgr_h_disabled 2937 #define memmgrVerifyGspDmaOps(arg0, arg1) memmgrVerifyGspDmaOps_IMPL(arg0, arg1) 2938 #endif //__nvoc_mem_mgr_h_disabled 2939 2940 NV_STATUS memmgrReserveMemoryForFsp_IMPL(OBJGPU *pGpu, struct MemoryManager *pMemoryManager); 2941 2942 #ifdef __nvoc_mem_mgr_h_disabled 2943 static inline NV_STATUS memmgrReserveMemoryForFsp(OBJGPU *pGpu, struct MemoryManager *pMemoryManager) { 2944 NV_ASSERT_FAILED_PRECOMP("MemoryManager was disabled!"); 2945 return NV_ERR_NOT_SUPPORTED; 2946 } 2947 #else //__nvoc_mem_mgr_h_disabled 2948 #define memmgrReserveMemoryForFsp(pGpu, pMemoryManager) memmgrReserveMemoryForFsp_IMPL(pGpu, pMemoryManager) 2949 #endif //__nvoc_mem_mgr_h_disabled 2950 2951 #undef PRIVATE_FIELD 2952 2953 2954 #endif // MEM_MGR_H 2955 2956 #ifdef __cplusplus 2957 } // extern "C" 2958 #endif 2959 2960 #endif // _G_MEM_MGR_NVOC_H_ 2961