xref: /linux/drivers/gpu/drm/xe/abi/gsc_proxy_commands_abi.h (revision b7e1e969c887c897947fdc3754fe9b0c24acb155)
1*997a55caSDaniele Ceraolo Spurio /* SPDX-License-Identifier: MIT */
2*997a55caSDaniele Ceraolo Spurio /*
3*997a55caSDaniele Ceraolo Spurio  * Copyright © 2023 Intel Corporation
4*997a55caSDaniele Ceraolo Spurio  */
5*997a55caSDaniele Ceraolo Spurio 
6*997a55caSDaniele Ceraolo Spurio #ifndef _ABI_GSC_PROXY_COMMANDS_ABI_H
7*997a55caSDaniele Ceraolo Spurio #define _ABI_GSC_PROXY_COMMANDS_ABI_H
8*997a55caSDaniele Ceraolo Spurio 
9*997a55caSDaniele Ceraolo Spurio #include <linux/types.h>
10*997a55caSDaniele Ceraolo Spurio 
11*997a55caSDaniele Ceraolo Spurio /* Heci client ID for proxy commands */
12*997a55caSDaniele Ceraolo Spurio #define HECI_MEADDRESS_PROXY 10
13*997a55caSDaniele Ceraolo Spurio 
14*997a55caSDaniele Ceraolo Spurio /* FW-defined proxy header */
15*997a55caSDaniele Ceraolo Spurio struct xe_gsc_proxy_header {
16*997a55caSDaniele Ceraolo Spurio 	/*
17*997a55caSDaniele Ceraolo Spurio 	 * hdr:
18*997a55caSDaniele Ceraolo Spurio 	 * Bits 0-7: type of the proxy message (see enum xe_gsc_proxy_type)
19*997a55caSDaniele Ceraolo Spurio 	 * Bits 8-15: rsvd
20*997a55caSDaniele Ceraolo Spurio 	 * Bits 16-31: length in bytes of the payload following the proxy header
21*997a55caSDaniele Ceraolo Spurio 	 */
22*997a55caSDaniele Ceraolo Spurio 	u32 hdr;
23*997a55caSDaniele Ceraolo Spurio #define GSC_PROXY_TYPE		 GENMASK(7, 0)
24*997a55caSDaniele Ceraolo Spurio #define GSC_PROXY_PAYLOAD_LENGTH GENMASK(31, 16)
25*997a55caSDaniele Ceraolo Spurio 
26*997a55caSDaniele Ceraolo Spurio 	u32 source;		/* Source of the Proxy message */
27*997a55caSDaniele Ceraolo Spurio 	u32 destination;	/* Destination of the Proxy message */
28*997a55caSDaniele Ceraolo Spurio #define GSC_PROXY_ADDRESSING_KMD  0x10000
29*997a55caSDaniele Ceraolo Spurio #define GSC_PROXY_ADDRESSING_GSC  0x20000
30*997a55caSDaniele Ceraolo Spurio #define GSC_PROXY_ADDRESSING_CSME 0x30000
31*997a55caSDaniele Ceraolo Spurio 
32*997a55caSDaniele Ceraolo Spurio 	u32 status;		/* Command status */
33*997a55caSDaniele Ceraolo Spurio } __packed;
34*997a55caSDaniele Ceraolo Spurio 
35*997a55caSDaniele Ceraolo Spurio /* FW-defined proxy types */
36*997a55caSDaniele Ceraolo Spurio enum xe_gsc_proxy_type {
37*997a55caSDaniele Ceraolo Spurio 	GSC_PROXY_MSG_TYPE_PROXY_INVALID = 0,
38*997a55caSDaniele Ceraolo Spurio 	GSC_PROXY_MSG_TYPE_PROXY_QUERY = 1,
39*997a55caSDaniele Ceraolo Spurio 	GSC_PROXY_MSG_TYPE_PROXY_PAYLOAD = 2,
40*997a55caSDaniele Ceraolo Spurio 	GSC_PROXY_MSG_TYPE_PROXY_END = 3,
41*997a55caSDaniele Ceraolo Spurio 	GSC_PROXY_MSG_TYPE_PROXY_NOTIFICATION = 4,
42*997a55caSDaniele Ceraolo Spurio };
43*997a55caSDaniele Ceraolo Spurio 
44*997a55caSDaniele Ceraolo Spurio #endif
45