Home | History | Annotate | Download | only in android
      1 # Copyright 2016 syzkaller project authors. All rights reserved.
      2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
      3 # billylau@
      4 
      5 # Description of ioctl calls for /dev/ion, which is based off of 3.18 kernel.
      6 # TODO: ION_IOC_HEAP_QUERY is detected for 4.10 upstream, but not covered in this description.
      7 
      8 include <asm/ioctl.h>
      9 include <linux/fcntl.h>
     10 include <../drivers/staging/android/uapi/ion.h>
     11 
     12 resource fd_ion[fd]
     13 resource fd_ion_generic[fd]
     14 
     15 resource ion_handle[int32]
     16 
     17 openat$ion(fd const[AT_FDCWD], file ptr[in, string["/dev/ion"]], flags flags[open_flags], mode const[0]) fd_ion
     18 ioctl$ION_IOC_ALLOC(fd fd_ion, cmd const[ION_IOC_ALLOC], arg ptr[inout, ion_allocation_data])
     19 ioctl$ION_IOC_FREE(fd fd_ion, cmd const[ION_IOC_FREE], arg ptr[in, ion_handle_data])
     20 ioctl$ION_IOC_MAP(fd fd_ion, cmd const[ION_IOC_MAP], arg ptr[inout, ion_fd_data])
     21 ioctl$ION_IOC_SHARE(fd fd_ion, cmd const[ION_IOC_SHARE], arg ptr[inout, ion_fd_data])
     22 ioctl$ION_IOC_IMPORT(fd fd_ion, cmd const[ION_IOC_IMPORT], arg ptr[inout, ion_fd_data])
     23 ioctl$ION_IOC_SYNC(fd fd_ion, cmd const[ION_IOC_SYNC], arg ptr[inout, ion_fd_data])
     24 ioctl$ION_IOC_CUSTOM(fd fd_ion, cmd const[ION_IOC_CUSTOM], arg ptr[inout, ion_custom_data])
     25 
     26 ion_allocation_data {
     27 	len	intptr
     28 	align	intptr
     29 	heapid	int32
     30 	flags	int32
     31 	handle	ion_handle
     32 }
     33 
     34 ion_handle_data {
     35 	handle	ion_handle
     36 }
     37 
     38 ion_fd_data {
     39 	handle	ion_handle
     40 	fd	fd_ion_generic
     41 }
     42 
     43 ion_custom_data {
     44 	cmd	int32
     45 	arg	intptr
     46 }
     47