1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2001-2023 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/ctrl506f.finn
31 //
32 
33 #include "ctrl/ctrlxxxx.h"
34 /* NV50_GPFIFO control commands and parameters */
35 
36 #define NV506F_CTRL_CMD(cat,idx)  \
37     NVXXXX_CTRL_CMD(0x506F, NV506F_CTRL_##cat, idx)
38 
39 /* NV50_GPFIFO command categories (6bits) */
40 #define NV506F_CTRL_RESERVED (0x00)
41 #define NV506F_CTRL_GPFIFO   (0x01)
42 #define NV506F_CTRL_EVENT    (0x02)
43 
44 /*
45  * NV506F_CTRL_CMD_NULL
46  *
47  * This command does nothing.
48  * This command does not take any parameters.
49  *
50  * Possible status values returned are:
51  *   NV_OK
52  */
53 #define NV506F_CTRL_CMD_NULL (0x506f0000) /* finn: Evaluated from "(FINN_NV50_CHANNEL_GPFIFO_RESERVED_INTERFACE_ID << 8) | 0x0" */
54 
55 /*
56  * NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL
57  *
58  * This command resets a channel which was isolated previously by RC recovery.
59  *
60  *   exceptType
61  *      This input parameter specifies the type of RC error that occurred. See the
62  *      description of the ROBUST_CHANNEL_* values in nverror.h for valid exceptType
63  *      values. info32 field of the error notifier is set with the exceptType when
64  *      the error notifier is signaled.
65  *
66  *   engineID
67  *      This input parameter specifies the engine to be reset.  See the description
68  *      of the NV2080_ENGINE_TYPE values in cl2080.h for valid engineID values.  info16
69  *      field of the error notifier is set with the engineID when the error notifier is
70  *      signaled.
71  *
72  * Possible status return values are:
73  *   NV_OK
74  *   NV_ERR_INVALID_ARGUMENT
75  */
76 
77 
78 #define NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL (0x506f0105) /* finn: Evaluated from "(FINN_NV50_CHANNEL_GPFIFO_GPFIFO_INTERFACE_ID << 8) | NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS_MESSAGE_ID" */
79 
80 /*
81  * NV506F_CTRL_CMD_EVENT_SET_TRIGGER  (deprecated on Fermi+)
82  *
83  * This command triggers a software event for the associated channel.
84  * This command accepts no parameters.
85  *
86  * Possible status values returned are:
87  *   NV_OK
88  */
89 // #define NV506F_CTRL_CMD_EVENT_SET_TRIGGER         NV506F_CTRL_CMD(EVENT, 0x09)
90 
91 #define NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS_MESSAGE_ID (0x5U)
92 
93 typedef struct NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS {
94     NvU32 exceptType;
95     NvU32 engineID;
96 } NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS;
97 
98 /*
99  * NV506F_CTRL_CMD_INTERNAL_RESET_ISOLATED_CHANNEL
100  *
101  * This command is an internal command sent from Kernel RM to Physical RM
102  * to perform the channel reset operations in hardware on an isolated channel
103  *
104  * Please see description of NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL for more information.
105  *
106  */
107 #define NV506F_CTRL_CMD_INTERNAL_RESET_ISOLATED_CHANNEL (0x506f0106) /* finn: Evaluated from "(FINN_NV50_CHANNEL_GPFIFO_GPFIFO_INTERFACE_ID << 8) | NV506F_CTRL_CMD_INTERNAL_RESET_ISOLATED_CHANNEL_PARAMS_MESSAGE_ID" */
108 
109 #define NV506F_CTRL_CMD_INTERNAL_RESET_ISOLATED_CHANNEL_PARAMS_MESSAGE_ID (0x6U)
110 
111 typedef NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS NV506F_CTRL_CMD_INTERNAL_RESET_ISOLATED_CHANNEL_PARAMS;
112 
113 /* _ctrl506f.h_ */
114