1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 /* 3 * Copyright (c) 2024-2025 Intel Corporation 4 * 5 * These are definitions for the mailbox command interface of CXL subsystem. 6 */ 7 #ifndef _UAPI_FWCTL_CXL_H_ 8 #define _UAPI_FWCTL_CXL_H_ 9 10 #include <linux/types.h> 11 #include <linux/stddef.h> 12 #include <cxl/features.h> 13 14 /** 15 * struct fwctl_rpc_cxl - ioctl(FWCTL_RPC) input for CXL 16 * @opcode: CXL mailbox command opcode 17 * @flags: Flags for the command (input). 18 * @op_size: Size of input payload. 19 * @reserved1: Reserved. Must be 0s. 20 * @get_sup_feats_in: Get Supported Features input 21 * @get_feat_in: Get Feature input 22 */ 23 struct fwctl_rpc_cxl { 24 __struct_group(fwctl_rpc_cxl_hdr, hdr, /* no attrs */, 25 __u32 opcode; 26 __u32 flags; 27 __u32 op_size; 28 __u32 reserved1; 29 ); 30 union { 31 struct cxl_mbox_get_sup_feats_in get_sup_feats_in; 32 struct cxl_mbox_get_feat_in get_feat_in; 33 }; 34 }; 35 36 /** 37 * struct fwctl_rpc_cxl_out - ioctl(FWCTL_RPC) output for CXL 38 * @size: Size of the output payload 39 * @retval: Return value from device 40 * @get_sup_feats_out: Get Supported Features output 41 * @payload: raw byte stream of payload 42 */ 43 struct fwctl_rpc_cxl_out { 44 __struct_group(fwctl_rpc_cxl_out_hdr, hdr, /* no attrs */, 45 __u32 size; 46 __u32 retval; 47 ); 48 union { 49 struct cxl_mbox_get_sup_feats_out get_sup_feats_out; 50 __DECLARE_FLEX_ARRAY(__u8, payload); 51 }; 52 }; 53 54 #endif 55