xref: /openbmc/linux/drivers/misc/mei/mkhi.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
17d88a258SVitaly Lubart /* SPDX-License-Identifier: GPL-2.0 */
27d88a258SVitaly Lubart /*
37d88a258SVitaly Lubart  * Copyright (c) 2003-2022, Intel Corporation. All rights reserved.
47d88a258SVitaly Lubart  * Intel Management Engine Interface (Intel MEI) Linux driver
57d88a258SVitaly Lubart  */
67d88a258SVitaly Lubart 
77d88a258SVitaly Lubart #ifndef _MEI_MKHI_H_
87d88a258SVitaly Lubart #define _MEI_MKHI_H_
97d88a258SVitaly Lubart 
107d88a258SVitaly Lubart #include <linux/types.h>
117d88a258SVitaly Lubart 
127d88a258SVitaly Lubart #define MKHI_FEATURE_PTT 0x10
137d88a258SVitaly Lubart 
147d88a258SVitaly Lubart #define MKHI_FWCAPS_GROUP_ID 0x3
157d88a258SVitaly Lubart #define MKHI_FWCAPS_SET_OS_VER_APP_RULE_CMD 6
167d88a258SVitaly Lubart #define MKHI_GEN_GROUP_ID 0xFF
177d88a258SVitaly Lubart #define MKHI_GEN_GET_FW_VERSION_CMD 0x2
187d88a258SVitaly Lubart 
19*fa313edeSTomas Winkler #define MKHI_GROUP_ID_GFX              0x30
20*fa313edeSTomas Winkler #define MKHI_GFX_RESET_WARN_CMD_REQ    0x0
21*fa313edeSTomas Winkler #define MKHI_GFX_MEMORY_READY_CMD_REQ  0x1
22*fa313edeSTomas Winkler 
23*fa313edeSTomas Winkler /* Allow transition to PXP mode without approval */
24*fa313edeSTomas Winkler #define MKHI_GFX_MEM_READY_PXP_ALLOWED  0x1
25*fa313edeSTomas Winkler 
267d88a258SVitaly Lubart struct mkhi_rule_id {
277d88a258SVitaly Lubart 	__le16 rule_type;
287d88a258SVitaly Lubart 	u8 feature_id;
297d88a258SVitaly Lubart 	u8 reserved;
307d88a258SVitaly Lubart } __packed;
317d88a258SVitaly Lubart 
327d88a258SVitaly Lubart struct mkhi_fwcaps {
337d88a258SVitaly Lubart 	struct mkhi_rule_id id;
347d88a258SVitaly Lubart 	u8 len;
357d88a258SVitaly Lubart 	u8 data[];
367d88a258SVitaly Lubart } __packed;
377d88a258SVitaly Lubart 
387d88a258SVitaly Lubart struct mkhi_msg_hdr {
397d88a258SVitaly Lubart 	u8  group_id;
407d88a258SVitaly Lubart 	u8  command;
417d88a258SVitaly Lubart 	u8  reserved;
427d88a258SVitaly Lubart 	u8  result;
437d88a258SVitaly Lubart } __packed;
447d88a258SVitaly Lubart 
457d88a258SVitaly Lubart struct mkhi_msg {
467d88a258SVitaly Lubart 	struct mkhi_msg_hdr hdr;
477d88a258SVitaly Lubart 	u8 data[];
487d88a258SVitaly Lubart } __packed;
497d88a258SVitaly Lubart 
50*fa313edeSTomas Winkler struct mkhi_gfx_mem_ready {
51*fa313edeSTomas Winkler 	struct mkhi_msg_hdr hdr;
52*fa313edeSTomas Winkler 	u32    flags;
53*fa313edeSTomas Winkler } __packed;
54*fa313edeSTomas Winkler 
557d88a258SVitaly Lubart #endif /* _MEI_MKHI_H_ */
56