interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / third_party / nvidia-open-580.173.02 / src / common / sdk / nvidia / inc / class / clc96f.h

113 lines · 7896 bytes Raw Blame History
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2003-2022 NVIDIA CORPORATION & AFFILIATES
3 * SPDX-License-Identifier: MIT
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24#ifndef __gb100_clc96f_h__
25#define __gb100_clc96f_h__
26
27#define BLACKWELL_CHANNEL_GPFIFO_A (0x0000C96F)
28
29typedef volatile struct Nvc96fControl_struct {
30 NvU32 Ignored00[0x23]; /* 0000-008b*/
31 NvU32 GPPut; /* GP FIFO put offset 008c-008f*/
32 NvU32 Ignored01[0x5c];
33} Nvc96fControl, BlackwellAControlGPFifo;
34
35#define NVC96F_SET_OBJECT (0x00000000)
36#define NVC96F_MEM_OP_A (0x00000028)
37#define NVC96F_MEM_OP_A_TLB_INVALIDATE_INVALIDATION_SIZE 5:0 // Used to specify size of invalidate, used for invalidates which are not of the REPLAY_CANCEL_TARGETED type
38#define NVC96F_MEM_OP_A_TLB_INVALIDATE_INVAL_SCOPE 7:6 // only relevant for invalidates with NVC96F_MEM_OP_C_TLB_INVALIDATE_REPLAY_NONE for invalidating link TLB only, or non-link TLB only or all TLBs
39#define NVC96F_MEM_OP_A_TLB_INVALIDATE_INVAL_SCOPE_NON_LINK_TLBS 2
40#define NVC96F_MEM_OP_A_TLB_INVALIDATE_SYSMEMBAR 11:11
41#define NVC96F_MEM_OP_A_TLB_INVALIDATE_SYSMEMBAR_EN 0x00000001
42#define NVC96F_MEM_OP_A_TLB_INVALIDATE_SYSMEMBAR_DIS 0x00000000
43#define NVC96F_MEM_OP_A_TLB_INVALIDATE_TARGET_ADDR_LO 31:12
44#define NVC96F_MEM_OP_B (0x0000002c)
45#define NVC96F_MEM_OP_B_TLB_INVALIDATE_TARGET_ADDR_HI 31:0
46#define NVC96F_MEM_OP_C (0x00000030)
47#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB 0:0
48#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_ONE 0x00000000
49#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_ALL 0x00000001 // Probably nonsensical for MMU_TLB_INVALIDATE_TARGETED
50#define NVC96F_MEM_OP_C_TLB_INVALIDATE_GPC 1:1
51#define NVC96F_MEM_OP_C_TLB_INVALIDATE_GPC_ENABLE 0x00000000
52#define NVC96F_MEM_OP_C_TLB_INVALIDATE_GPC_DISABLE 0x00000001
53#define NVC96F_MEM_OP_C_TLB_INVALIDATE_REPLAY 4:2 // only relevant if GPC ENABLE
54#define NVC96F_MEM_OP_C_TLB_INVALIDATE_REPLAY_NONE 0x00000000
55#define NVC96F_MEM_OP_C_TLB_INVALIDATE_ACK_TYPE 6:5 // only relevant if GPC ENABLE
56#define NVC96F_MEM_OP_C_TLB_INVALIDATE_ACK_TYPE_NONE 0x00000000
57#define NVC96F_MEM_OP_C_TLB_INVALIDATE_ACK_TYPE_GLOBALLY 0x00000001
58#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PAGE_TABLE_LEVEL 9:7 // Invalidate affects this level and all below
59#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PAGE_TABLE_LEVEL_ALL 0x00000000 // Invalidate tlb caches at all levels of the page table
60#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PAGE_TABLE_LEVEL_PTE_ONLY 0x00000001
61#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PAGE_TABLE_LEVEL_UP_TO_PDE4 0x00000006
62#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_APERTURE 11:10 // only relevant if PDB_ONE
63#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_APERTURE_VID_MEM 0x00000000
64#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_APERTURE_SYS_MEM_COHERENT 0x00000002
65#define NVC96F_MEM_OP_C_TLB_INVALIDATE_PDB_ADDR_LO 31:12 // only relevant if PDB_ONE
66
67#define NVC96F_MEM_OP_D (0x00000034)
68#define NVC96F_MEM_OP_D_TLB_INVALIDATE_PDB_ADDR_HI 26:0 // only relevant if PDB_ONE
69#define NVC96F_MEM_OP_D_OPERATION 31:27
70#define NVC96F_MEM_OP_D_OPERATION_MMU_TLB_INVALIDATE 0x00000009
71#define NVC96F_MEM_OP_D_OPERATION_MMU_TLB_INVALIDATE_TARGETED 0x0000000a
72#define NVC96F_MEM_OP_D_OPERATION_L2_FLUSH_DIRTY 0x00000010
73#define NVC96F_MEM_OP_D_OPERATION_L2_SYSMEM_NCOH_INVALIDATE 0x00000011
74
75#define NVC96F_SEM_ADDR_LO (0x0000005c)
76#define NVC96F_SEM_ADDR_LO_OFFSET 31:2
77#define NVC96F_SEM_ADDR_HI (0x00000060)
78#define NVC96F_SEM_ADDR_HI_OFFSET 24:0
79#define NVC96F_SEM_PAYLOAD_LO (0x00000064)
80#define NVC96F_SEM_PAYLOAD_HI (0x00000068)
81#define NVC96F_SEM_EXECUTE (0x0000006c)
82#define NVC96F_SEM_EXECUTE_OPERATION 2:0
83#define NVC96F_SEM_EXECUTE_OPERATION_ACQUIRE 0x00000000
84#define NVC96F_SEM_EXECUTE_OPERATION_RELEASE 0x00000001
85#define NVC96F_SEM_EXECUTE_RELEASE_WFI 20:20
86#define NVC96F_SEM_EXECUTE_RELEASE_WFI_DIS 0x00000000
87#define NVC96F_SEM_EXECUTE_PAYLOAD_SIZE 24:24
88#define NVC96F_SEM_EXECUTE_PAYLOAD_SIZE_32BIT 0x00000000
89
90/* GPFIFO entry format */
91#define NVC96F_GP_ENTRY__SIZE 8
92#define NVC96F_GP_ENTRY0_FETCH 0:0
93#define NVC96F_GP_ENTRY0_FETCH_UNCONDITIONAL 0x00000000
94#define NVC96F_GP_ENTRY0_FETCH_CONDITIONAL 0x00000001
95#define NVC96F_GP_ENTRY0_GET 31:2
96#define NVC96F_GP_ENTRY0_OPERAND 31:0
97#define NVC96F_GP_ENTRY0_PB_EXTENDED_BASE_OPERAND 24:8
98#define NVC96F_GP_ENTRY1_GET_HI 7:0
99#define NVC96F_GP_ENTRY1_LEVEL 9:9
100#define NVC96F_GP_ENTRY1_LEVEL_MAIN 0x00000000
101#define NVC96F_GP_ENTRY1_LEVEL_SUBROUTINE 0x00000001
102#define NVC96F_GP_ENTRY1_LENGTH 30:10
103#define NVC96F_GP_ENTRY1_SYNC 31:31
104#define NVC96F_GP_ENTRY1_SYNC_PROCEED 0x00000000
105#define NVC96F_GP_ENTRY1_SYNC_WAIT 0x00000001
106#define NVC96F_GP_ENTRY1_OPCODE 7:0
107#define NVC96F_GP_ENTRY1_OPCODE_NOP 0x00000000
108#define NVC96F_GP_ENTRY1_OPCODE_ILLEGAL 0x00000001
109#define NVC96F_GP_ENTRY1_OPCODE_GP_CRC 0x00000002
110#define NVC96F_GP_ENTRY1_OPCODE_PB_CRC 0x00000003
111#define NVC96F_GP_ENTRY1_OPCODE_SET_PB_SEGMENT_EXTENDED_BASE 0x00000004
112
113#endif // __gb100_clc96f_h__