xref: /linux/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1fa6c12e0SMichal Wajdeczko /* SPDX-License-Identifier: MIT */
2fa6c12e0SMichal Wajdeczko /*
3fa6c12e0SMichal Wajdeczko  * Copyright © 2023 Intel Corporation
4fa6c12e0SMichal Wajdeczko  */
5fa6c12e0SMichal Wajdeczko 
659058f2aSMichal Wajdeczko #ifndef _ABI_GUC_ACTIONS_SRIOV_ABI_H
759058f2aSMichal Wajdeczko #define _ABI_GUC_ACTIONS_SRIOV_ABI_H
8fa6c12e0SMichal Wajdeczko 
9fa6c12e0SMichal Wajdeczko #include "guc_communication_ctb_abi.h"
10fa6c12e0SMichal Wajdeczko 
11fa6c12e0SMichal Wajdeczko /**
12fa6c12e0SMichal Wajdeczko  * DOC: GUC2PF_RELAY_FROM_VF
13fa6c12e0SMichal Wajdeczko  *
14fa6c12e0SMichal Wajdeczko  * This message is used by the GuC firmware to forward a VF2PF `Relay Message`_
15fa6c12e0SMichal Wajdeczko  * received from the Virtual Function (VF) driver to this Physical Function (PF)
16fa6c12e0SMichal Wajdeczko  * driver.
17fa6c12e0SMichal Wajdeczko  *
18fa6c12e0SMichal Wajdeczko  * This message is always sent as `CTB HXG Message`_.
19fa6c12e0SMichal Wajdeczko  *
20fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
21fa6c12e0SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
22fa6c12e0SMichal Wajdeczko  *  +===+=======+==============================================================+
23fa6c12e0SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
24fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
25fa6c12e0SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_                                   |
26fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
27fa6c12e0SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
28fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
29fa6c12e0SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`XE_GUC_ACTION_GUC2PF_RELAY_FROM_VF` = 0x5100      |
30fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
31fa6c12e0SMichal Wajdeczko  *  | 1 |  31:0 | **VFID** - source VF identifier                              |
32fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
33fa6c12e0SMichal Wajdeczko  *  | 2 |  31:0 | **RELAY_ID** - VF/PF message ID                              |
34fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
35fa6c12e0SMichal Wajdeczko  *  | 3 |  31:0 | **RELAY_DATA1** |                                            |
36fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
37fa6c12e0SMichal Wajdeczko  *  |...|       |                 |       [Embedded `Relay Message`_]          |
38fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
39fa6c12e0SMichal Wajdeczko  *  | n |  31:0 | **RELAY_DATAx** |                                            |
40fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
41fa6c12e0SMichal Wajdeczko  */
42fa6c12e0SMichal Wajdeczko #define XE_GUC_ACTION_GUC2PF_RELAY_FROM_VF		0x5100
43fa6c12e0SMichal Wajdeczko 
44fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_MIN_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
45fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_MAX_LEN \
46fa6c12e0SMichal Wajdeczko 	(GUC2PF_RELAY_FROM_VF_EVENT_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
47fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
48fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
49fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_2_RELAY_ID	GUC_HXG_EVENT_MSG_n_DATAn
50fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_3_RELAY_DATA1	GUC_HXG_EVENT_MSG_n_DATAn
51fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_n_RELAY_DATAx	GUC_HXG_EVENT_MSG_n_DATAn
52fa6c12e0SMichal Wajdeczko #define GUC2PF_RELAY_FROM_VF_EVENT_MSG_NUM_RELAY_DATA	GUC_RELAY_MSG_MAX_LEN
53fa6c12e0SMichal Wajdeczko 
54fa6c12e0SMichal Wajdeczko /**
55fa6c12e0SMichal Wajdeczko  * DOC: PF2GUC_RELAY_TO_VF
56fa6c12e0SMichal Wajdeczko  *
57fa6c12e0SMichal Wajdeczko  * This H2G message is used by the Physical Function (PF) driver to send embedded
58fa6c12e0SMichal Wajdeczko  * VF2PF `Relay Message`_ to the VF.
59fa6c12e0SMichal Wajdeczko  *
60fa6c12e0SMichal Wajdeczko  * This action message must be sent over CTB as `CTB HXG Message`_.
61fa6c12e0SMichal Wajdeczko  *
62fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
63fa6c12e0SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
64fa6c12e0SMichal Wajdeczko  *  +===+=======+==============================================================+
65fa6c12e0SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
66fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
67fa6c12e0SMichal Wajdeczko  *  |   | 30:28 | TYPE = `GUC_HXG_TYPE_FAST_REQUEST`_                          |
68fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
69fa6c12e0SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
70fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
71fa6c12e0SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`XE_GUC_ACTION_PF2GUC_RELAY_TO_VF` = 0x5101        |
72fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
73fa6c12e0SMichal Wajdeczko  *  | 1 |  31:0 | **VFID** - target VF identifier                              |
74fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
75fa6c12e0SMichal Wajdeczko  *  | 2 |  31:0 | **RELAY_ID** - VF/PF message ID                              |
76fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
77fa6c12e0SMichal Wajdeczko  *  | 3 |  31:0 | **RELAY_DATA1** |                                            |
78fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
79fa6c12e0SMichal Wajdeczko  *  |...|       |                 |       [Embedded `Relay Message`_]          |
80fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
81fa6c12e0SMichal Wajdeczko  *  | n |  31:0 | **RELAY_DATAx** |                                            |
82fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
83fa6c12e0SMichal Wajdeczko  */
84fa6c12e0SMichal Wajdeczko #define XE_GUC_ACTION_PF2GUC_RELAY_TO_VF		0x5101
85fa6c12e0SMichal Wajdeczko 
86fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_MIN_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 2u)
87fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_MAX_LEN \
88fa6c12e0SMichal Wajdeczko 	(PF2GUC_RELAY_TO_VF_REQUEST_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
89fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
90fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_1_VFID		GUC_HXG_REQUEST_MSG_n_DATAn
91fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_2_RELAY_ID	GUC_HXG_REQUEST_MSG_n_DATAn
92fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_3_RELAY_DATA1	GUC_HXG_REQUEST_MSG_n_DATAn
93fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_n_RELAY_DATAx	GUC_HXG_REQUEST_MSG_n_DATAn
94fa6c12e0SMichal Wajdeczko #define PF2GUC_RELAY_TO_VF_REQUEST_MSG_NUM_RELAY_DATA	GUC_RELAY_MSG_MAX_LEN
95fa6c12e0SMichal Wajdeczko 
96fa6c12e0SMichal Wajdeczko /**
97fa6c12e0SMichal Wajdeczko  * DOC: GUC2VF_RELAY_FROM_PF
98fa6c12e0SMichal Wajdeczko  *
99fa6c12e0SMichal Wajdeczko  * This message is used by the GuC firmware to deliver `Relay Message`_ from the
100fa6c12e0SMichal Wajdeczko  * Physical Function (PF) driver to this Virtual Function (VF) driver.
101fa6c12e0SMichal Wajdeczko  * See `GuC Relay Communication`_ for details.
102fa6c12e0SMichal Wajdeczko  *
103fa6c12e0SMichal Wajdeczko  * This message is always sent over CTB.
104fa6c12e0SMichal Wajdeczko  *
105fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
106fa6c12e0SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
107fa6c12e0SMichal Wajdeczko  *  +===+=======+==============================================================+
108fa6c12e0SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
109fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
110fa6c12e0SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_                                   |
111fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
112fa6c12e0SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
113fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
114fa6c12e0SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`XE_GUC_ACTION_GUC2VF_RELAY_FROM_PF` = 0x5102      |
115fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
116fa6c12e0SMichal Wajdeczko  *  | 1 |  31:0 | **RELAY_ID** - VF/PF message ID                              |
117fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
118fa6c12e0SMichal Wajdeczko  *  | 2 |  31:0 | **RELAY_DATA1** |                                            |
119fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
120fa6c12e0SMichal Wajdeczko  *  |...|       |                 |       [Embedded `Relay Message`_]          |
121fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
122fa6c12e0SMichal Wajdeczko  *  | n |  31:0 | **RELAY_DATAx** |                                            |
123fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
124fa6c12e0SMichal Wajdeczko  */
125fa6c12e0SMichal Wajdeczko #define XE_GUC_ACTION_GUC2VF_RELAY_FROM_PF		0x5102
126fa6c12e0SMichal Wajdeczko 
127fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_MIN_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 1u)
128fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_MAX_LEN \
129fa6c12e0SMichal Wajdeczko 	(GUC2VF_RELAY_FROM_PF_EVENT_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
130fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
131fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_1_RELAY_ID	GUC_HXG_EVENT_MSG_n_DATAn
132fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_n_RELAY_DATAx	GUC_HXG_EVENT_MSG_n_DATAn
133fa6c12e0SMichal Wajdeczko #define GUC2VF_RELAY_FROM_PF_EVENT_MSG_NUM_RELAY_DATA	GUC_RELAY_MSG_MAX_LEN
134fa6c12e0SMichal Wajdeczko 
135fa6c12e0SMichal Wajdeczko /**
136fa6c12e0SMichal Wajdeczko  * DOC: VF2GUC_RELAY_TO_PF
137fa6c12e0SMichal Wajdeczko  *
138fa6c12e0SMichal Wajdeczko  * This message is used by the Virtual Function (VF) drivers to communicate with
139fa6c12e0SMichal Wajdeczko  * the Physical Function (PF) driver and send `Relay Message`_ to the PF driver.
140fa6c12e0SMichal Wajdeczko  * See `GuC Relay Communication`_ for details.
141fa6c12e0SMichal Wajdeczko  *
142fa6c12e0SMichal Wajdeczko  * This message must be sent over CTB.
143fa6c12e0SMichal Wajdeczko  *
144fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
145fa6c12e0SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
146fa6c12e0SMichal Wajdeczko  *  +===+=======+==============================================================+
147fa6c12e0SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
148fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
149fa6c12e0SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ or GUC_HXG_TYPE_FAST_REQUEST_   |
150fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
151fa6c12e0SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
152fa6c12e0SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
153fa6c12e0SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`XE_GUC_ACTION_VF2GUC_RELAY_TO_PF` = 0x5103        |
154fa6c12e0SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
155fa6c12e0SMichal Wajdeczko  *  | 1 |  31:0 | **RELAY_ID** - VF/PF message ID                              |
156fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
157fa6c12e0SMichal Wajdeczko  *  | 2 |  31:0 | **RELAY_DATA1** |                                            |
158fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
159fa6c12e0SMichal Wajdeczko  *  |...|       |                 |       [Embedded `Relay Message`_]          |
160fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+                                            |
161fa6c12e0SMichal Wajdeczko  *  | n |  31:0 | **RELAY_DATAx** |                                            |
162fa6c12e0SMichal Wajdeczko  *  +---+-------+-----------------+--------------------------------------------+
163fa6c12e0SMichal Wajdeczko  */
164fa6c12e0SMichal Wajdeczko #define XE_GUC_ACTION_VF2GUC_RELAY_TO_PF		0x5103
165fa6c12e0SMichal Wajdeczko 
166fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_MIN_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 1u)
167fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_MAX_LEN \
168fa6c12e0SMichal Wajdeczko 	(VF2GUC_RELAY_TO_PF_REQUEST_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
169fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
170fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_1_RELAY_ID	GUC_HXG_REQUEST_MSG_n_DATAn
171fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_n_RELAY_DATAx	GUC_HXG_REQUEST_MSG_n_DATAn
172fa6c12e0SMichal Wajdeczko #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_NUM_RELAY_DATA	GUC_RELAY_MSG_MAX_LEN
173fa6c12e0SMichal Wajdeczko 
174476f6c48SMichal Wajdeczko /**
175d5e12fffSMichal Wajdeczko  * DOC: GUC2PF_ADVERSE_EVENT
176d5e12fffSMichal Wajdeczko  *
177d5e12fffSMichal Wajdeczko  * This message is used by the GuC to notify PF about adverse events.
178d5e12fffSMichal Wajdeczko  *
179d5e12fffSMichal Wajdeczko  * This G2H message must be sent as `CTB HXG Message`_.
180d5e12fffSMichal Wajdeczko  *
181d5e12fffSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
182d5e12fffSMichal Wajdeczko  *  |   | Bits  | Description                                                  |
183d5e12fffSMichal Wajdeczko  *  +===+=======+==============================================================+
184d5e12fffSMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
185d5e12fffSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
186d5e12fffSMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_                                   |
187d5e12fffSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
188d5e12fffSMichal Wajdeczko  *  |   | 27:16 | DATA0 = MBZ                                                  |
189d5e12fffSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
190d5e12fffSMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_GUC2PF_ADVERSE_EVENT` = 0x5104         |
191d5e12fffSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
192d5e12fffSMichal Wajdeczko  *  | 1 |  31:0 | DATA1 = **VFID** - VF identifier                             |
193d5e12fffSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
194d5e12fffSMichal Wajdeczko  *  | 2 |  31:0 | DATA2 = **THRESHOLD** - key of the exceeded threshold        |
195d5e12fffSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
196d5e12fffSMichal Wajdeczko  */
197d5e12fffSMichal Wajdeczko #define GUC_ACTION_GUC2PF_ADVERSE_EVENT			0x5104
198d5e12fffSMichal Wajdeczko 
199d5e12fffSMichal Wajdeczko #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
200d5e12fffSMichal Wajdeczko #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
201d5e12fffSMichal Wajdeczko #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
202d5e12fffSMichal Wajdeczko #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_2_THRESHOLD	GUC_HXG_EVENT_MSG_n_DATAn
203d5e12fffSMichal Wajdeczko 
204d5e12fffSMichal Wajdeczko /**
205476f6c48SMichal Wajdeczko  * DOC: GUC2PF_VF_STATE_NOTIFY
206476f6c48SMichal Wajdeczko  *
207476f6c48SMichal Wajdeczko  * The GUC2PF_VF_STATE_NOTIFY message is used by the GuC to notify PF about change
208476f6c48SMichal Wajdeczko  * of the VF state.
209476f6c48SMichal Wajdeczko  *
210476f6c48SMichal Wajdeczko  * This G2H message is sent as `CTB HXG Message`_.
211476f6c48SMichal Wajdeczko  *
212476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
213476f6c48SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
214476f6c48SMichal Wajdeczko  *  +===+=======+==============================================================+
215476f6c48SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
216476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
217476f6c48SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_                                   |
218476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
219476f6c48SMichal Wajdeczko  *  |   | 27:16 | DATA0 = MBZ                                                  |
220476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
221476f6c48SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_GUC2PF_VF_STATE_NOTIFY` = 0x5106       |
222476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
223476f6c48SMichal Wajdeczko  *  | 1 |  31:0 | DATA1 = **VFID** - VF identifier                             |
224476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
225476f6c48SMichal Wajdeczko  *  | 2 |  31:0 | DATA2 = **EVENT** - notification event:                      |
226476f6c48SMichal Wajdeczko  *  |   |       |                                                              |
227476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_NOTIFY_VF_ENABLE` = 1 (only if VFID = 0)        |
228476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_NOTIFY_VF_FLR` = 1                              |
229476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_NOTIFY_VF_FLR_DONE` = 2                         |
230476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_NOTIFY_VF_PAUSE_DONE` = 3                       |
231476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_NOTIFY_VF_FIXUP_DONE` = 4                       |
232476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
233476f6c48SMichal Wajdeczko  */
234476f6c48SMichal Wajdeczko #define GUC_ACTION_GUC2PF_VF_STATE_NOTIFY		0x5106u
235476f6c48SMichal Wajdeczko 
236476f6c48SMichal Wajdeczko #define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
237476f6c48SMichal Wajdeczko #define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
238476f6c48SMichal Wajdeczko #define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
239476f6c48SMichal Wajdeczko #define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_2_EVENT	GUC_HXG_EVENT_MSG_n_DATAn
240476f6c48SMichal Wajdeczko #define   GUC_PF_NOTIFY_VF_ENABLE			1u
241476f6c48SMichal Wajdeczko #define   GUC_PF_NOTIFY_VF_FLR				1u
242476f6c48SMichal Wajdeczko #define   GUC_PF_NOTIFY_VF_FLR_DONE			2u
243476f6c48SMichal Wajdeczko #define   GUC_PF_NOTIFY_VF_PAUSE_DONE			3u
244476f6c48SMichal Wajdeczko #define   GUC_PF_NOTIFY_VF_FIXUP_DONE			4u
245476f6c48SMichal Wajdeczko 
246476f6c48SMichal Wajdeczko /**
247e158cf93SMichal Wajdeczko  * DOC: VF2GUC_MATCH_VERSION
248e158cf93SMichal Wajdeczko  *
249e158cf93SMichal Wajdeczko  * This action is used to match VF interface version used by VF and GuC.
250e158cf93SMichal Wajdeczko  *
251e158cf93SMichal Wajdeczko  * This message must be sent as `MMIO HXG Message`_.
252e158cf93SMichal Wajdeczko  *
253e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
254e158cf93SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
255e158cf93SMichal Wajdeczko  *  +===+=======+==============================================================+
256e158cf93SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
257e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
258e158cf93SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
259e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
260e158cf93SMichal Wajdeczko  *  |   | 27:16 | DATA0 = MBZ                                                  |
261e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
262e158cf93SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_VF2GUC_MATCH_VERSION` = 0x5500         |
263e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
264e158cf93SMichal Wajdeczko  *  | 1 | 31:24 | **BRANCH** - branch ID of the VF interface                   |
265e158cf93SMichal Wajdeczko  *  |   |       | (use BRANCH_ANY to request latest version supported by GuC)  |
266e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
267e158cf93SMichal Wajdeczko  *  |   | 23:16 | **MAJOR** - major version of the VF interface                |
268e158cf93SMichal Wajdeczko  *  |   |       | (use MAJOR_ANY to request latest version supported by GuC)   |
269e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
270e158cf93SMichal Wajdeczko  *  |   |  15:8 | **MINOR** - minor version of the VF interface                |
271e158cf93SMichal Wajdeczko  *  |   |       | (use MINOR_ANY to request latest version supported by GuC)   |
272e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
273e158cf93SMichal Wajdeczko  *  |   |   7:0 | **MBZ**                                                      |
274e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
275e158cf93SMichal Wajdeczko  *
276e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
277e158cf93SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
278e158cf93SMichal Wajdeczko  *  +===+=======+==============================================================+
279e158cf93SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
280e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
281e158cf93SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
282e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
283e158cf93SMichal Wajdeczko  *  |   |  27:0 | DATA0 = MBZ                                                  |
284e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
285e158cf93SMichal Wajdeczko  *  | 1 | 31:24 | **BRANCH** - branch ID of the VF interface                   |
286e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
287e158cf93SMichal Wajdeczko  *  |   | 23:16 | **MAJOR** - major version of the VF interface                |
288e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
289e158cf93SMichal Wajdeczko  *  |   |  15:8 | **MINOR** - minor version of the VF interface                |
290e158cf93SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
291e158cf93SMichal Wajdeczko  *  |   |   7:0 | **PATCH** - patch version of the VF interface                |
292e158cf93SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
293e158cf93SMichal Wajdeczko  */
294e158cf93SMichal Wajdeczko #define GUC_ACTION_VF2GUC_MATCH_VERSION			0x5500u
295e158cf93SMichal Wajdeczko 
296e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 1u)
297e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
298e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_1_BRANCH	(0xffu << 24)
299e158cf93SMichal Wajdeczko #define   GUC_VERSION_BRANCH_ANY			0
300e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_1_MAJOR	(0xffu << 16)
301e158cf93SMichal Wajdeczko #define   GUC_VERSION_MAJOR_ANY				0
302e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_1_MINOR	(0xffu << 8)
303e158cf93SMichal Wajdeczko #define   GUC_VERSION_MINOR_ANY				0
304e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_REQUEST_MSG_1_MBZ		(0xffu << 0)
305e158cf93SMichal Wajdeczko 
306e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_LEN		(GUC_HXG_RESPONSE_MSG_MIN_LEN + 1u)
307e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_0_MBZ		GUC_HXG_RESPONSE_MSG_0_DATA0
308e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_1_BRANCH	(0xffu << 24)
309e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_1_MAJOR	(0xffu << 16)
310e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_1_MINOR	(0xffu << 8)
311e158cf93SMichal Wajdeczko #define VF2GUC_MATCH_VERSION_RESPONSE_MSG_1_PATCH	(0xffu << 0)
312e158cf93SMichal Wajdeczko 
313e158cf93SMichal Wajdeczko /**
314bbc8a6fbSMichal Wajdeczko  * DOC: PF2GUC_UPDATE_VGT_POLICY
315bbc8a6fbSMichal Wajdeczko  *
316bbc8a6fbSMichal Wajdeczko  * This message is used by the PF to set `GuC VGT Policy KLVs`_.
317bbc8a6fbSMichal Wajdeczko  *
318bbc8a6fbSMichal Wajdeczko  * This message must be sent as `CTB HXG Message`_.
319bbc8a6fbSMichal Wajdeczko  *
320bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
321bbc8a6fbSMichal Wajdeczko  *  |   | Bits  | Description                                                  |
322bbc8a6fbSMichal Wajdeczko  *  +===+=======+==============================================================+
323bbc8a6fbSMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
324bbc8a6fbSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
325bbc8a6fbSMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
326bbc8a6fbSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
327bbc8a6fbSMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
328bbc8a6fbSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
329bbc8a6fbSMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_PF2GUC_UPDATE_VGT_POLICY` = 0x5502     |
330bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
331bbc8a6fbSMichal Wajdeczko  *  | 1 |  31:0 | **CFG_ADDR_LO** - dword aligned GGTT offset that             |
332bbc8a6fbSMichal Wajdeczko  *  |   |       | represents the start of `GuC VGT Policy KLVs`_ list.         |
333bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
334bbc8a6fbSMichal Wajdeczko  *  | 2 |  31:0 | **CFG_ADDR_HI** - upper 32 bits of above offset.             |
335bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
336bbc8a6fbSMichal Wajdeczko  *  | 3 |  31:0 | **CFG_SIZE** - size (in dwords) of the config buffer         |
337bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
338bbc8a6fbSMichal Wajdeczko  *
339bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
340bbc8a6fbSMichal Wajdeczko  *  |   | Bits  | Description                                                  |
341bbc8a6fbSMichal Wajdeczko  *  +===+=======+==============================================================+
342bbc8a6fbSMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
343bbc8a6fbSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
344bbc8a6fbSMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
345bbc8a6fbSMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
346bbc8a6fbSMichal Wajdeczko  *  |   |  27:0 | **COUNT** - number of KLVs successfully applied              |
347bbc8a6fbSMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
348bbc8a6fbSMichal Wajdeczko  */
349bbc8a6fbSMichal Wajdeczko #define GUC_ACTION_PF2GUC_UPDATE_VGT_POLICY			0x5502u
350bbc8a6fbSMichal Wajdeczko 
351bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_REQUEST_MSG_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 3u)
352bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
353bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_REQUEST_MSG_1_CFG_ADDR_LO	GUC_HXG_REQUEST_MSG_n_DATAn
354bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_REQUEST_MSG_2_CFG_ADDR_HI	GUC_HXG_REQUEST_MSG_n_DATAn
355bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_REQUEST_MSG_3_CFG_SIZE		GUC_HXG_REQUEST_MSG_n_DATAn
356bbc8a6fbSMichal Wajdeczko 
357bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_RESPONSE_MSG_LEN		GUC_HXG_RESPONSE_MSG_MIN_LEN
358bbc8a6fbSMichal Wajdeczko #define PF2GUC_UPDATE_VGT_POLICY_RESPONSE_MSG_0_COUNT		GUC_HXG_RESPONSE_MSG_0_DATA0
359bbc8a6fbSMichal Wajdeczko 
360bbc8a6fbSMichal Wajdeczko /**
3613f11bcc6SMichal Wajdeczko  * DOC: PF2GUC_UPDATE_VF_CFG
3623f11bcc6SMichal Wajdeczko  *
3633f11bcc6SMichal Wajdeczko  * The `PF2GUC_UPDATE_VF_CFG`_ message is used by PF to provision single VF in GuC.
3643f11bcc6SMichal Wajdeczko  *
3653f11bcc6SMichal Wajdeczko  * This message must be sent as `CTB HXG Message`_.
3663f11bcc6SMichal Wajdeczko  *
3673f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3683f11bcc6SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
3693f11bcc6SMichal Wajdeczko  *  +===+=======+==============================================================+
3703f11bcc6SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
3713f11bcc6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
3723f11bcc6SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
3733f11bcc6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
3743f11bcc6SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
3753f11bcc6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
3763f11bcc6SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_PF2GUC_UPDATE_VF_CFG` = 0x5503         |
3773f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3783f11bcc6SMichal Wajdeczko  *  | 1 |  31:0 | **VFID** - identifier of the VF that the KLV                 |
3793f11bcc6SMichal Wajdeczko  *  |   |       | configurations are being applied to                          |
3803f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3813f11bcc6SMichal Wajdeczko  *  | 2 |  31:0 | **CFG_ADDR_LO** - dword aligned GGTT offset that represents  |
3823f11bcc6SMichal Wajdeczko  *  |   |       | the start of a list of virtualization related KLV configs    |
3833f11bcc6SMichal Wajdeczko  *  |   |       | that are to be applied to the VF.                            |
3843f11bcc6SMichal Wajdeczko  *  |   |       | If this parameter is zero, the list is not parsed.           |
3853f11bcc6SMichal Wajdeczko  *  |   |       | If full configs address parameter is zero and configs_size is|
3863f11bcc6SMichal Wajdeczko  *  |   |       | zero associated VF config shall be reset to its default state|
3873f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3883f11bcc6SMichal Wajdeczko  *  | 3 |  31:0 | **CFG_ADDR_HI** - upper 32 bits of configs address.          |
3893f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3903f11bcc6SMichal Wajdeczko  *  | 4 |  31:0 | **CFG_SIZE** - size (in dwords) of the config buffer         |
3913f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3923f11bcc6SMichal Wajdeczko  *
3933f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
3943f11bcc6SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
3953f11bcc6SMichal Wajdeczko  *  +===+=======+==============================================================+
3963f11bcc6SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
3973f11bcc6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
3983f11bcc6SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
3993f11bcc6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
4003f11bcc6SMichal Wajdeczko  *  |   |  27:0 | **COUNT** - number of KLVs successfully applied              |
4013f11bcc6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
4023f11bcc6SMichal Wajdeczko  */
4033f11bcc6SMichal Wajdeczko #define GUC_ACTION_PF2GUC_UPDATE_VF_CFG			0x5503u
4043f11bcc6SMichal Wajdeczko 
4053f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 4u)
4063f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
4073f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_1_VFID		GUC_HXG_REQUEST_MSG_n_DATAn
4083f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_2_CFG_ADDR_LO	GUC_HXG_REQUEST_MSG_n_DATAn
4093f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_3_CFG_ADDR_HI	GUC_HXG_REQUEST_MSG_n_DATAn
4103f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_REQUEST_MSG_4_CFG_SIZE	GUC_HXG_REQUEST_MSG_n_DATAn
4113f11bcc6SMichal Wajdeczko 
4123f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_RESPONSE_MSG_LEN		GUC_HXG_RESPONSE_MSG_MIN_LEN
4133f11bcc6SMichal Wajdeczko #define PF2GUC_UPDATE_VF_CFG_RESPONSE_MSG_0_COUNT	GUC_HXG_RESPONSE_MSG_0_DATA0
4143f11bcc6SMichal Wajdeczko 
4153f11bcc6SMichal Wajdeczko /**
416476f6c48SMichal Wajdeczko  * DOC: PF2GUC_VF_CONTROL
417476f6c48SMichal Wajdeczko  *
418476f6c48SMichal Wajdeczko  * The PF2GUC_VF_CONTROL message is used by the PF to trigger VF state change
419476f6c48SMichal Wajdeczko  * maintained by the GuC.
420476f6c48SMichal Wajdeczko  *
421476f6c48SMichal Wajdeczko  * This H2G message must be sent as `CTB HXG Message`_.
422476f6c48SMichal Wajdeczko  *
423476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
424476f6c48SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
425476f6c48SMichal Wajdeczko  *  +===+=======+==============================================================+
426476f6c48SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
427476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
428476f6c48SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
429476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
430476f6c48SMichal Wajdeczko  *  |   | 27:16 | DATA0 = MBZ                                                  |
431476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
432476f6c48SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_PF2GUC_VF_CONTROL_CMD` = 0x5506        |
433476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
434476f6c48SMichal Wajdeczko  *  | 1 |  31:0 | DATA1 = **VFID** - VF identifier                             |
435476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
436476f6c48SMichal Wajdeczko  *  | 2 |  31:0 | DATA2 = **COMMAND** - control command:                       |
437476f6c48SMichal Wajdeczko  *  |   |       |                                                              |
438476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_TRIGGER_VF_PAUSE` = 1                           |
439476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_TRIGGER_VF_RESUME` = 2                          |
440476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_TRIGGER_VF_STOP` = 3                            |
441476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_TRIGGER_VF_FLR_START` = 4                       |
442476f6c48SMichal Wajdeczko  *  |   |       |   - _`GUC_PF_TRIGGER_VF_FLR_FINISH` = 5                      |
443476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
444476f6c48SMichal Wajdeczko  *
445476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
446476f6c48SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
447476f6c48SMichal Wajdeczko  *  +===+=======+==============================================================+
448476f6c48SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
449476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
450476f6c48SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
451476f6c48SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
452476f6c48SMichal Wajdeczko  *  |   |  27:0 | DATA0 = MBZ                                                  |
453476f6c48SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
454476f6c48SMichal Wajdeczko  */
455476f6c48SMichal Wajdeczko #define GUC_ACTION_PF2GUC_VF_CONTROL			0x5506u
456476f6c48SMichal Wajdeczko 
457476f6c48SMichal Wajdeczko #define PF2GUC_VF_CONTROL_REQUEST_MSG_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
458476f6c48SMichal Wajdeczko #define PF2GUC_VF_CONTROL_REQUEST_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
459476f6c48SMichal Wajdeczko #define PF2GUC_VF_CONTROL_REQUEST_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
460476f6c48SMichal Wajdeczko #define PF2GUC_VF_CONTROL_REQUEST_MSG_2_COMMAND		GUC_HXG_EVENT_MSG_n_DATAn
461476f6c48SMichal Wajdeczko #define   GUC_PF_TRIGGER_VF_PAUSE			1u
462476f6c48SMichal Wajdeczko #define   GUC_PF_TRIGGER_VF_RESUME			2u
463476f6c48SMichal Wajdeczko #define   GUC_PF_TRIGGER_VF_STOP			3u
464476f6c48SMichal Wajdeczko #define   GUC_PF_TRIGGER_VF_FLR_START			4u
465476f6c48SMichal Wajdeczko #define   GUC_PF_TRIGGER_VF_FLR_FINISH			5u
466476f6c48SMichal Wajdeczko 
467769551c4SMichal Wajdeczko /**
468769551c4SMichal Wajdeczko  * DOC: VF2GUC_VF_RESET
469769551c4SMichal Wajdeczko  *
470769551c4SMichal Wajdeczko  * This action is used by VF to reset GuC's VF state.
471769551c4SMichal Wajdeczko  *
472769551c4SMichal Wajdeczko  * This message must be sent as `MMIO HXG Message`_.
473769551c4SMichal Wajdeczko  *
474769551c4SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
475769551c4SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
476769551c4SMichal Wajdeczko  *  +===+=======+==============================================================+
477769551c4SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
478769551c4SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
479769551c4SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
480769551c4SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
481769551c4SMichal Wajdeczko  *  |   | 27:16 | DATA0 = MBZ                                                  |
482769551c4SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
483769551c4SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_VF2GUC_VF_RESET` = 0x5507              |
484769551c4SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
485769551c4SMichal Wajdeczko  *
486769551c4SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
487769551c4SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
488769551c4SMichal Wajdeczko  *  +===+=======+==============================================================+
489769551c4SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
490769551c4SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
491769551c4SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
492769551c4SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
493769551c4SMichal Wajdeczko  *  |   |  27:0 | DATA0 = MBZ                                                  |
494769551c4SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
495769551c4SMichal Wajdeczko  */
496769551c4SMichal Wajdeczko #define GUC_ACTION_VF2GUC_VF_RESET			0x5507u
497769551c4SMichal Wajdeczko 
498769551c4SMichal Wajdeczko #define VF2GUC_VF_RESET_REQUEST_MSG_LEN			GUC_HXG_REQUEST_MSG_MIN_LEN
499769551c4SMichal Wajdeczko #define VF2GUC_VF_RESET_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
500769551c4SMichal Wajdeczko 
501769551c4SMichal Wajdeczko #define VF2GUC_VF_RESET_RESPONSE_MSG_LEN		GUC_HXG_RESPONSE_MSG_MIN_LEN
502769551c4SMichal Wajdeczko #define VF2GUC_VF_RESET_RESPONSE_MSG_0_MBZ		GUC_HXG_RESPONSE_MSG_0_DATA0
503769551c4SMichal Wajdeczko 
504*c454f1a6SMichal Wajdeczko /**
505*c454f1a6SMichal Wajdeczko  * DOC: VF2GUC_QUERY_SINGLE_KLV
506*c454f1a6SMichal Wajdeczko  *
507*c454f1a6SMichal Wajdeczko  * This action is used by VF to query value of the single KLV data.
508*c454f1a6SMichal Wajdeczko  *
509*c454f1a6SMichal Wajdeczko  * This message must be sent as `MMIO HXG Message`_.
510*c454f1a6SMichal Wajdeczko  *
511*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
512*c454f1a6SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
513*c454f1a6SMichal Wajdeczko  *  +===+=======+==============================================================+
514*c454f1a6SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
515*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
516*c454f1a6SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
517*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
518*c454f1a6SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
519*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
520*c454f1a6SMichal Wajdeczko  *  |   |  15:0 | ACTION = _`GUC_ACTION_VF2GUC_QUERY_SINGLE_KLV` = 0x5509      |
521*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
522*c454f1a6SMichal Wajdeczko  *  | 1 | 31:16 | MBZ                                                          |
523*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
524*c454f1a6SMichal Wajdeczko  *  |   |  15:0 | **KEY** - key for which value is requested                   |
525*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
526*c454f1a6SMichal Wajdeczko  *
527*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
528*c454f1a6SMichal Wajdeczko  *  |   | Bits  | Description                                                  |
529*c454f1a6SMichal Wajdeczko  *  +===+=======+==============================================================+
530*c454f1a6SMichal Wajdeczko  *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
531*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
532*c454f1a6SMichal Wajdeczko  *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
533*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
534*c454f1a6SMichal Wajdeczko  *  |   | 27:16 | MBZ                                                          |
535*c454f1a6SMichal Wajdeczko  *  |   +-------+--------------------------------------------------------------+
536*c454f1a6SMichal Wajdeczko  *  |   |  15:0 | **LENGTH** - length of data in dwords                        |
537*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
538*c454f1a6SMichal Wajdeczko  *  | 1 |  31:0 | **VALUE32** - bits 31:0 of value if **LENGTH** >= 1          |
539*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
540*c454f1a6SMichal Wajdeczko  *  | 2 |  31:0 | **VALUE64** - bits 63:32 of value if **LENGTH** >= 2         |
541*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
542*c454f1a6SMichal Wajdeczko  *  | 3 |  31:0 | **VALUE96** - bits 95:64 of value if **LENGTH** >= 3         |
543*c454f1a6SMichal Wajdeczko  *  +---+-------+--------------------------------------------------------------+
544*c454f1a6SMichal Wajdeczko  */
545*c454f1a6SMichal Wajdeczko #define GUC_ACTION_VF2GUC_QUERY_SINGLE_KLV		0x5509u
546*c454f1a6SMichal Wajdeczko 
547*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_REQUEST_MSG_LEN		(GUC_HXG_REQUEST_MSG_MIN_LEN + 1u)
548*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_REQUEST_MSG_0_MBZ	GUC_HXG_REQUEST_MSG_0_DATA0
549*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_REQUEST_MSG_1_MBZ	(0xffffu << 16)
550*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_REQUEST_MSG_1_KEY	(0xffffu << 0)
551*c454f1a6SMichal Wajdeczko 
552*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_MIN_LEN	GUC_HXG_RESPONSE_MSG_MIN_LEN
553*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_MAX_LEN	(GUC_HXG_RESPONSE_MSG_MIN_LEN + 3u)
554*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_0_MBZ	(0xfffu << 16)
555*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_0_LENGTH	(0xffffu << 0)
556*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_1_VALUE32	GUC_HXG_REQUEST_MSG_n_DATAn
557*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_2_VALUE64	GUC_HXG_REQUEST_MSG_n_DATAn
558*c454f1a6SMichal Wajdeczko #define VF2GUC_QUERY_SINGLE_KLV_RESPONSE_MSG_3_VALUE96	GUC_HXG_REQUEST_MSG_n_DATAn
559*c454f1a6SMichal Wajdeczko 
560fa6c12e0SMichal Wajdeczko #endif
561