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_LINUX_VSOC_SHM_H 20 #define _UAPI_LINUX_VSOC_SHM_H 21 #include <linux/types.h> 22 struct fd_scoped_permission { 23 __u32 begin_offset; 24 __u32 end_offset; 25 __u32 owner_offset; 26 __u32 owned_value; 27 }; 28 #define VSOC_REGION_FREE ((__u32) 0) 29 struct fd_scoped_permission_arg { 30 struct fd_scoped_permission perm; 31 __s32 managed_region_fd; 32 }; 33 #define VSOC_NODE_FREE ((__u32) 0) 34 struct vsoc_signal_table_layout { 35 __u32 num_nodes_lg2; 36 __u32 futex_uaddr_table_offset; 37 __u32 interrupt_signalled_offset; 38 }; 39 #define VSOC_REGION_WHOLE ((__s32) 0) 40 #define VSOC_DEVICE_NAME_SZ 16 41 struct vsoc_device_region { 42 __u16 current_version; 43 __u16 min_compatible_version; 44 __u32 region_begin_offset; 45 __u32 region_end_offset; 46 __u32 offset_of_region_data; 47 struct vsoc_signal_table_layout guest_to_host_signal_table; 48 struct vsoc_signal_table_layout host_to_guest_signal_table; 49 char device_name[VSOC_DEVICE_NAME_SZ]; 50 __u32 managed_by; 51 }; 52 struct vsoc_shm_layout_descriptor { 53 __u16 major_version; 54 __u16 minor_version; 55 __u32 size; 56 __u32 region_count; 57 __u32 vsoc_region_desc_offset; 58 }; 59 #define CURRENT_VSOC_LAYOUT_MAJOR_VERSION 2 60 #define CURRENT_VSOC_LAYOUT_MINOR_VERSION 0 61 #define VSOC_CREATE_FD_SCOPED_PERMISSION _IOW(0xF5, 0, struct fd_scoped_permission) 62 #define VSOC_GET_FD_SCOPED_PERMISSION _IOR(0xF5, 1, struct fd_scoped_permission) 63 #define VSOC_MAYBE_SEND_INTERRUPT_TO_HOST _IO(0xF5, 2) 64 #define VSOC_WAIT_FOR_INCOMING_INTERRUPT _IO(0xF5, 3) 65 #define VSOC_DESCRIBE_REGION _IOR(0xF5, 4, struct vsoc_device_region) 66 #define VSOC_SELF_INTERRUPT _IO(0xF5, 5) 67 #define VSOC_SEND_INTERRUPT_TO_HOST _IO(0xF5, 6) 68 enum wait_types { 69 VSOC_WAIT_UNDEFINED = 0, 70 VSOC_WAIT_IF_EQUAL = 1, 71 VSOC_WAIT_IF_EQUAL_TIMEOUT = 2 72 }; 73 struct vsoc_cond_wait { 74 __u32 offset; 75 __u32 value; 76 __u64 wake_time_sec; 77 __u32 wake_time_nsec; 78 __u32 wait_type; 79 __u32 wakes; 80 __u32 reserved_1; 81 }; 82 #define VSOC_COND_WAIT _IOWR(0xF5, 7, struct vsoc_cond_wait) 83 #define VSOC_COND_WAKE _IO(0xF5, 8) 84 #endif 85 86