cxl.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #include <linux/types.h>
  10. #include <linux/stddef.h>
  11. #include <cxl/features.h>
  12. /**
  13. * struct fwctl_rpc_cxl - ioctl(FWCTL_RPC) input for CXL
  14. * @opcode: CXL mailbox command opcode
  15. * @flags: Flags for the command (input).
  16. * @op_size: Size of input payload.
  17. * @reserved1: Reserved. Must be 0s.
  18. * @get_sup_feats_in: Get Supported Features input
  19. * @get_feat_in: Get Feature input
  20. * @set_feat_in: Set Feature input
  21. */
  22. struct fwctl_rpc_cxl {
  23. __struct_group(fwctl_rpc_cxl_hdr, hdr, /* no attrs */,
  24. __u32 opcode;
  25. __u32 flags;
  26. __u32 op_size;
  27. __u32 reserved1;
  28. );
  29. union {
  30. struct cxl_mbox_get_sup_feats_in get_sup_feats_in;
  31. struct cxl_mbox_get_feat_in get_feat_in;
  32. struct cxl_mbox_set_feat_in set_feat_in;
  33. };
  34. };
  35. /**
  36. * struct fwctl_rpc_cxl_out - ioctl(FWCTL_RPC) output for CXL
  37. * @size: Size of the output payload
  38. * @retval: Return value from device
  39. * @get_sup_feats_out: Get Supported Features output
  40. * @payload: raw byte stream of payload
  41. */
  42. struct fwctl_rpc_cxl_out {
  43. __struct_group(fwctl_rpc_cxl_out_hdr, hdr, /* no attrs */,
  44. __u32 size;
  45. __u32 retval;
  46. );
  47. union {
  48. struct cxl_mbox_get_sup_feats_out get_sup_feats_out;
  49. __DECLARE_FLEX_ARRAY(__u8, payload);
  50. };
  51. };
  52. #endif