Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_MISC_OCXL_H |
| 20 | #define _UAPI_MISC_OCXL_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/ioctl.h> |
| 23 | enum ocxl_event_type { |
| 24 | OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0, |
| 25 | }; |
| 26 | #define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 |
| 27 | struct ocxl_kernel_event_header { |
| 28 | __u16 type; |
| 29 | __u16 flags; |
| 30 | __u32 reserved; |
| 31 | }; |
| 32 | struct ocxl_kernel_event_xsl_fault_error { |
| 33 | __u64 addr; |
| 34 | __u64 dsisr; |
| 35 | __u64 count; |
| 36 | __u64 reserved; |
| 37 | }; |
| 38 | struct ocxl_ioctl_attach { |
| 39 | __u64 amr; |
| 40 | __u64 reserved1; |
| 41 | __u64 reserved2; |
| 42 | __u64 reserved3; |
| 43 | }; |
| 44 | struct ocxl_ioctl_metadata { |
| 45 | __u16 version; |
| 46 | __u8 afu_version_major; |
| 47 | __u8 afu_version_minor; |
| 48 | __u32 pasid; |
| 49 | __u64 pp_mmio_size; |
| 50 | __u64 global_mmio_size; |
| 51 | __u64 reserved[13]; |
| 52 | }; |
| 53 | struct ocxl_ioctl_irq_fd { |
| 54 | __u64 irq_offset; |
| 55 | __s32 eventfd; |
| 56 | __u32 reserved; |
| 57 | }; |
| 58 | #define OCXL_MAGIC 0xCA |
| 59 | #define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach) |
| 60 | #define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) |
| 61 | #define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) |
| 62 | #define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) |
| 63 | #define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata) |
| 64 | #endif |