Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_MISC_OCXL_H |
| 8 | #define _UAPI_MISC_OCXL_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/ioctl.h> |
| 11 | enum ocxl_event_type { |
| 12 | OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0, |
| 13 | }; |
| 14 | #define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 |
| 15 | struct ocxl_kernel_event_header { |
| 16 | __u16 type; |
| 17 | __u16 flags; |
| 18 | __u32 reserved; |
| 19 | }; |
| 20 | struct ocxl_kernel_event_xsl_fault_error { |
| 21 | __u64 addr; |
| 22 | __u64 dsisr; |
| 23 | __u64 count; |
| 24 | __u64 reserved; |
| 25 | }; |
| 26 | struct ocxl_ioctl_attach { |
| 27 | __u64 amr; |
| 28 | __u64 reserved1; |
| 29 | __u64 reserved2; |
| 30 | __u64 reserved3; |
| 31 | }; |
| 32 | struct ocxl_ioctl_metadata { |
| 33 | __u16 version; |
| 34 | __u8 afu_version_major; |
| 35 | __u8 afu_version_minor; |
| 36 | __u32 pasid; |
| 37 | __u64 pp_mmio_size; |
| 38 | __u64 global_mmio_size; |
| 39 | __u64 reserved[13]; |
| 40 | }; |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 41 | struct ocxl_ioctl_p9_wait { |
| 42 | __u16 thread_id; |
| 43 | __u16 reserved1; |
| 44 | __u32 reserved2; |
| 45 | __u64 reserved3[3]; |
| 46 | }; |
| 47 | #define OCXL_IOCTL_FEATURES_FLAGS0_P9_WAIT 0x01 |
| 48 | struct ocxl_ioctl_features { |
| 49 | __u64 flags[4]; |
| 50 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 51 | struct ocxl_ioctl_irq_fd { |
| 52 | __u64 irq_offset; |
| 53 | __s32 eventfd; |
| 54 | __u32 reserved; |
| 55 | }; |
| 56 | #define OCXL_MAGIC 0xCA |
| 57 | #define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach) |
| 58 | #define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) |
| 59 | #define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) |
| 60 | #define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) |
| 61 | #define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata) |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 62 | #define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait) |
| 63 | #define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 64 | #endif |