1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
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 #pragma once
25 
26 #include <nvtypes.h>
27 
28 //
29 // This file was generated with FINN, an NVIDIA coding tool.
30 // Source file:      ctrl/ctrlc369.finn
31 //
32 
33 #include "ctrl/ctrlxxxx.h"
34 /* MMU_FAULT_BUFFER control commands and parameters */
35 
36 #define NVC369_CTRL_CMD(cat,idx)          NVXXXX_CTRL_CMD(0xC369, NVC369_CTRL_##cat, idx)
37 
38 /* MMU_FAULT_BUFFER command categories (6bits) */
39 #define NVC369_CTRL_RESERVED         (0x00)
40 #define NVC369_CTRL_MMU_FAULT_BUFFER (0x01)
41 
42 /*
43  * NVC369_CTRL_CMD_NULL
44  *
45  * This command does nothing.
46  * This command does not take any parameters.
47  *
48  * Possible status values returned are:
49  *   NV_OK
50  */
51 #define NVC369_CTRL_CMD_NULL         (0xc3690000) /* finn: Evaluated from "(FINN_MMU_FAULT_BUFFER_RESERVED_INTERFACE_ID << 8) | 0x0" */
52 
53 
54 
55 
56 
57 
58 /*
59  * NVC369_CTRL_CMD_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUFFER
60  *
61  * This call creates and registers a client buffer for the non replayable faults
62  *
63  *    pShadowBuffer [OUT]
64  *       This parameter represents the pointer to the shadow buffer
65  *
66  *    pShadowBufferContext [OUT]
67  *       Execution context for pShadowBuffer queue
68  *
69  *    bufferSize [OUT]
70  *       Size in bytes of the shadow buffer for non replayable faults
71  *
72  * Possible status values returned are:
73  *   NV_OK
74  */
75 
76 #define NVC369_CTRL_CMD_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUF (0xc3690101) /* finn: Evaluated from "(FINN_MMU_FAULT_BUFFER_MMU_FAULT_BUFFER_INTERFACE_ID << 8) | NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUF_PARAMS_MESSAGE_ID" */
77 
78 #define NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUF_PARAMS_MESSAGE_ID (0x1U)
79 
80 typedef struct NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUF_PARAMS {
81     NV_DECLARE_ALIGNED(NvP64 pShadowBuffer, 8);
82     NV_DECLARE_ALIGNED(NvP64 pShadowBufferContext, 8);
83     NV_DECLARE_ALIGNED(NvP64 pShadowBufferMetadata, 8);
84     NvU32 bufferSize;
85 } NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_NON_REPLAY_BUF_PARAMS;
86 
87 
88 /*
89  * NVC369_CTRL_CMD_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUFFER
90  *
91  * This call unregisters and destroys a client buffer for the non replayable
92  * faults
93  *
94  *    pShadowBuffer [IN]
95  *       This parameter represents the pointer to the shadow buffer
96  *
97  * Possible status values returned are:
98  *   NV_OK
99  *   NV_ERR_INVALID_ARGUMENT
100  */
101 
102 #define NVC369_CTRL_CMD_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUF (0xc3690102) /* finn: Evaluated from "(FINN_MMU_FAULT_BUFFER_MMU_FAULT_BUFFER_INTERFACE_ID << 8) | NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUF_PARAMS_MESSAGE_ID" */
103 
104 #define NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUF_PARAMS_MESSAGE_ID (0x2U)
105 
106 typedef struct NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUF_PARAMS {
107     NV_DECLARE_ALIGNED(NvP64 pShadowBuffer, 8);
108 } NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_NON_REPLAY_BUF_PARAMS;
109 
110 /*
111  * NVC369_CTRL_CMD_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUFFER
112  *
113  * This call creates and registers a client buffer for the replayable faults
114  *
115  *    pShadowBuffer [OUT]
116  *       This parameter represents the pointer to the shadow buffer
117  *
118  *    bufferSize [OUT]
119  *       Size in bytes of the shadow buffer for non replayable faults
120  *
121  * Possible status values returned are:
122  *   NV_OK
123  */
124 
125 #define NVC369_CTRL_CMD_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUF (0xc3690103) /* finn: Evaluated from "(FINN_MMU_FAULT_BUFFER_MMU_FAULT_BUFFER_INTERFACE_ID << 8) | NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUF_PARAMS_MESSAGE_ID" */
126 
127 #define NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUF_PARAMS_MESSAGE_ID (0x3U)
128 
129 typedef struct NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUF_PARAMS {
130     NV_DECLARE_ALIGNED(NvP64 pShadowBuffer, 8);
131     NV_DECLARE_ALIGNED(NvP64 pShadowBufferMetadata, 8);
132     NvU32 bufferSize;
133 } NVC369_CTRL_MMU_FAULT_BUFFER_REGISTER_REPLAY_BUF_PARAMS;
134 
135 /*
136  * NVC369_CTRL_CMD_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUFFER
137  *
138  * This call unregisters and destroys a client buffer for the replayable
139  * faults
140  *
141  *    pShadowBuffer [IN]
142  *       This parameter represents the pointer to the shadow buffer
143  *
144  * Possible status values returned are:
145  *   NV_OK
146  *   NV_ERR_INVALID_ARGUMENT
147  */
148 
149 #define NVC369_CTRL_CMD_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUF (0xc3690104) /* finn: Evaluated from "(FINN_MMU_FAULT_BUFFER_MMU_FAULT_BUFFER_INTERFACE_ID << 8) | NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUF_PARAMS_MESSAGE_ID" */
150 
151 #define NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUF_PARAMS_MESSAGE_ID (0x4U)
152 
153 typedef struct NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUF_PARAMS {
154     NV_DECLARE_ALIGNED(NvP64 pShadowBuffer, 8);
155 } NVC369_CTRL_MMU_FAULT_BUFFER_UNREGISTER_REPLAY_BUF_PARAMS;
156 
157 /* _ctrlc369_h_ */
158