CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / third_party / nvidia-open-580.173.02 / src / common / sdk / nvidia / inc / class / cl0070.h
| 1 | /* |
| 2 | * Copyright (c) 2001-2022, NVIDIA CORPORATION. All rights reserved. |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice shall be included in |
| 12 | * all copies or substantial portions of the Software. |
| 13 | * |
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 20 | * DEALINGS IN THE SOFTWARE. |
| 21 | */ |
| 22 | |
| 23 | #pragma once |
| 24 | |
| 25 | #include <nvtypes.h> |
| 26 | |
| 27 | // |
| 28 | // This file was generated with FINN, an NVIDIA coding tool. |
| 29 | // Source file: class/cl0070.finn |
| 30 | // |
| 31 | |
| 32 | #define NV01_MEMORY_VIRTUAL (0x70U) /* finn: Evaluated from "NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS_MESSAGE_ID" */ |
| 33 | #define NV01_MEMORY_SYSTEM_DYNAMIC (0x70U) /* finn: Evaluated from "NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS_MESSAGE_ID" */ |
| 34 | |
| 35 | /* |
| 36 | * NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS |
| 37 | * |
| 38 | * Allocation params for NV01_MEMORY_VIRTUAL. |
| 39 | * |
| 40 | * NV01_MEMORY_SYSTEM_DYNAMIC is an alias for NV01_MEMORY_VIRTUAL. This |
| 41 | * was traditionally allocated with RmAllocMemory64(). The default GPU |
| 42 | * virtual address space is used, and the limit of this address space is |
| 43 | * returned in limit. The NV01_MEMORY_SYSTEM_DYNAMIC handle can be |
| 44 | * passed to RmAllocContextDma2() with an offset/limit. The context dma |
| 45 | * handle can then be used as the hDma handle for RmMapMemoryDma. |
| 46 | * |
| 47 | * This behavior is maintained in the RM compatibility shim. |
| 48 | * |
| 49 | * NV01_MEMORY_VIRTUAL replaces this behavior with a single object. |
| 50 | * |
| 51 | * hVASpace - if hVASpace is NV01_NULL_OBJECT the default GPU VA space is |
| 52 | * selected. Alternatively a FERMI_VASPACE_A handle may be specified. |
| 53 | * |
| 54 | * The NV_MEMORY_VIRTUAL_SYSMEM_DYNAMIC_HVASPACE is used for by the |
| 55 | * compatibility layer to emulate NV01_MEMORY_SYSTEM_DYNAMIC semantics. |
| 56 | * |
| 57 | * offset - An offset into the virtual address space may be specified. This |
| 58 | * will limit range of the GPU VA returned by RmMapMemoryDma to be |
| 59 | * above offset. |
| 60 | * |
| 61 | * limit - When limit is zero the maximum limit used. If a non-zero limit |
| 62 | * is specified then it will be used. The final limit is returned. |
| 63 | */ |
| 64 | #define NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS_MESSAGE_ID (0x0070U) |
| 65 | |
| 66 | typedef struct NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS { |
| 67 | NV_DECLARE_ALIGNED(NvU64 offset, 8); // [IN] - offset into address space |
| 68 | NV_DECLARE_ALIGNED(NvU64 limit, 8); // [IN/OUT] - limit of address space |
| 69 | NvHandle hVASpace; // [IN] - Address space handle |
| 70 | } NV_MEMORY_VIRTUAL_ALLOCATION_PARAMS; |
| 71 | |
| 72 | #define NV_MEMORY_VIRTUAL_SYSMEM_DYNAMIC_HVASPACE 0xffffffffU |
| 73 |