aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorSimran Kathpalia <skathpalia3@gmail.com>2021-07-08 23:56:22 +0530
committerMark Johnston <markjdb@gmail.com>2021-08-17 09:47:30 -0400
commita2fe1cb58994e43fb14f141ecd6e6dcce9bb697a (patch)
tree0345047bebe5acb999f2262ca9e5bc01a46ec55c /sys
parent33c26cb735dc83786ebebe071a3e17cdd5383ead (diff)
sys/freebsd: added io(4), smbus(4), efidev(4), evdev(4)
Diffstat (limited to 'sys')
-rw-r--r--sys/freebsd/dev_smbus.txt49
-rw-r--r--sys/freebsd/dev_smbus.txt.const17
-rw-r--r--sys/freebsd/efidev.txt51
-rw-r--r--sys/freebsd/efidev.txt.const10
-rw-r--r--sys/freebsd/evdev.txt193
-rw-r--r--sys/freebsd/evdev.txt.const59
6 files changed, 379 insertions, 0 deletions
diff --git a/sys/freebsd/dev_smbus.txt b/sys/freebsd/dev_smbus.txt
new file mode 100644
index 000000000..2e943e1dd
--- /dev/null
+++ b/sys/freebsd/dev_smbus.txt
@@ -0,0 +1,49 @@
+# Copyright 2021 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+# Autogenerated by sys2syz
+
+include <fcntl.h>
+include <sys/types.h>
+include <dev/smbus/smb.h>
+
+resource fd_smbus[fd]
+
+openat$smbus(fd const[AT_FDCWD], file ptr[in, string["/dev/smbN"]], flags flags[open_flags], mode const[0]) fd_smbus
+
+ioctl$SMB_QUICK_WRITE(fd fd_smbus, cmd const[SMB_QUICK_WRITE], arg ptr[in, smbcmd])
+ioctl$SMB_QUICK_READ(fd fd_smbus, cmd const[SMB_QUICK_READ], arg ptr[in, smbcmd])
+ioctl$SMB_SENDB(fd fd_smbus, cmd const[SMB_SENDB], arg ptr[in, smbcmd])
+ioctl$SMB_RECVB(fd fd_smbus, cmd const[SMB_RECVB], arg ptr[inout, smbcmd])
+ioctl$SMB_WRITEB(fd fd_smbus, cmd const[SMB_WRITEB], arg ptr[in, smbcmd])
+ioctl$SMB_WRITEW(fd fd_smbus, cmd const[SMB_WRITEW], arg ptr[in, smbcmd])
+ioctl$SMB_READB(fd fd_smbus, cmd const[SMB_READB], arg ptr[inout, smbcmd])
+ioctl$SMB_READW(fd fd_smbus, cmd const[SMB_READW], arg ptr[inout, smbcmd])
+ioctl$SMB_PCALL(fd fd_smbus, cmd const[SMB_PCALL], arg ptr[inout, smbcmd])
+ioctl$SMB_BWRITE(fd fd_smbus, cmd const[SMB_BWRITE], arg ptr[in, smbcmd])
+ioctl$SMB_BREAD(fd fd_smbus, cmd const[SMB_BREAD], arg ptr[inout, smbcmd])
+ioctl$SMB_OLD_TRANS(fd fd_smbus, cmd const[SMB_OLD_TRANS], arg ptr[inout, smbcmd])
+
+smbcmd {
+ cmd int8
+ reserved int8
+ op int16
+ wdata wdata
+ rdata rdata
+ slave int32
+ wbuf ptr[in, int8]
+ wcount len[wbuf, int32]
+ rbuf ptr[in, int8]
+ rcount len[rbuf, int32]
+}
+
+wdata [
+ byte int8
+ buf array[int8, 2]
+ word int16
+]
+
+rdata [
+ byte int8
+ buf array[int8, 2]
+ word int16
+]
diff --git a/sys/freebsd/dev_smbus.txt.const b/sys/freebsd/dev_smbus.txt.const
new file mode 100644
index 000000000..500a4c893
--- /dev/null
+++ b/sys/freebsd/dev_smbus.txt.const
@@ -0,0 +1,17 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64
+AT_FDCWD = 18446744073709551516
+SMB_BREAD = 3224398091
+SMB_BWRITE = 2150656266
+SMB_OLD_TRANS = 3224398092
+SMB_PCALL = 3224398089
+SMB_QUICK_READ = 2150656258
+SMB_QUICK_WRITE = 2150656257
+SMB_READB = 3224398087
+SMB_READW = 3224398088
+SMB_RECVB = 3224398084
+SMB_SENDB = 2150656259
+SMB_WRITEB = 2150656261
+SMB_WRITEW = 2150656262
+SYS_ioctl = 54
+SYS_openat = 499
diff --git a/sys/freebsd/efidev.txt b/sys/freebsd/efidev.txt
new file mode 100644
index 000000000..0649524b9
--- /dev/null
+++ b/sys/freebsd/efidev.txt
@@ -0,0 +1,51 @@
+# Copyright 2021 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+# Autogenerated by sys2syz
+
+include <sys/types.h>
+include <fcntl.h>
+include <sys/param.h>
+include <sys/efi.h>
+include <efiio.h>
+
+resource fd_efidev[fd]
+
+openat$efidev(fd const[AT_FDCWD], file ptr[in, string["/dev/efi"]], flags flags[open_flags], mode const[0]) fd_efidev
+
+ioctl$EFIIOC_GET_TIME(fd fd_efidev, cmd const[EFIIOC_GET_TIME], arg ptr[out, efi_tm])
+ioctl$EFIIOC_SET_TIME(fd fd_efidev, cmd const[EFIIOC_SET_TIME], arg ptr[in, efi_tm])
+ioctl$EFIIOC_VAR_GET(fd fd_efidev, cmd const[EFIIOC_VAR_GET], arg ptr[inout, efi_var_ioc])
+ioctl$EFIIOC_VAR_NEXT(fd fd_efidev, cmd const[EFIIOC_VAR_NEXT], arg ptr[inout, efi_var_ioc])
+ioctl$EFIIOC_VAR_SET(fd fd_efidev, cmd const[EFIIOC_VAR_SET], arg ptr[inout, efi_var_ioc])
+
+efi_tm {
+ tm_year int16
+ tm_mon int8[1:12]
+ tm_mday int8[1:31]
+ tm_hour int8[0:23]
+ tm_min int8[0:59]
+ tm_sec int8[0:59]
+ __pad1 int8
+ tm_nsec int32
+ tm_tz int16
+ tm_dst int8
+ __pad2 int8
+}
+
+efi_var_ioc {
+ name ptr[in, int16]
+ namesize len[name, int32]
+ vendor uuid
+ attrib int32
+ data ptr[in, array[int8]]
+ datasize len[data, int32]
+}
+
+uuid {
+ time_low int32
+ time_mid int16
+ time_hi_and_version int16
+ clock_seq_hi_and_reserved int8
+ clock_seq_low int8
+ node array[int8, 6]
+}
diff --git a/sys/freebsd/efidev.txt.const b/sys/freebsd/efidev.txt.const
new file mode 100644
index 000000000..c848efeb3
--- /dev/null
+++ b/sys/freebsd/efidev.txt.const
@@ -0,0 +1,10 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64
+AT_FDCWD = 18446744073709551516
+EFIIOC_GET_TIME = 1074808066
+EFIIOC_SET_TIME = 2148549891
+EFIIOC_VAR_GET = 3224913156
+EFIIOC_VAR_NEXT = 3224913157
+EFIIOC_VAR_SET = 3224913158
+SYS_ioctl = 54
+SYS_openat = 499
diff --git a/sys/freebsd/evdev.txt b/sys/freebsd/evdev.txt
new file mode 100644
index 000000000..37ec4689d
--- /dev/null
+++ b/sys/freebsd/evdev.txt
@@ -0,0 +1,193 @@
+# Copyright 2021 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+# Autogenerated by sys2syz
+
+include <fcntl.h>
+include <dev/evdev/uinput.h>
+include <dev/evdev/input.h>
+
+resource fd_evdev[fd]
+
+openat$evdev(fd const[AT_FDCWD], file ptr[in, string["/dev/input/eventN"]], flags flags[open_flags], mode const[0]) fd_evdev
+
+define EVIOCGABS_MIN EVIOCGABS(0)
+define EVIOCGABS_MAX EVIOCGABS(ABS_MAX)
+define EVIOCSABS_MIN EVIOCGABS(0)
+define EVIOCSABS_MAX EVIOCGABS(ABS_MAX)
+define EVIOCGNAME_CONST EVIOCGNAME(0)
+define EVIOCGPHYS_CONST EVIOCGPHYS(0)
+define EVIOCGUNIQ_CONST EVIOCGUNIQ(0)
+define EVIOCGPROP_CONST EVIOCGPROP(0)
+define EVIOCGMTSLOTS_CONST EVIOCGMTSLOTS(0)
+define EVIOCGLED_CONST EVIOCGLED(0)
+define EVIOCGKEY_CONST EVIOCGKEY(0)
+define EVIOCGSND_CONST EVIOCGSND(0)
+define EVIOCGSW_CONST EVIOCGSW(0)
+define EVIOCGBIT_MIN EVIOCGBIT(0, 0)
+define EVIOCGBIT_MAX EVIOCGBIT(EV_MAX, 0)
+
+ioctl$EVIOCGVERSION(fd fd_evdev, cmd const[EVIOCGVERSION], arg int32)
+ioctl$EVIOCGID(fd fd_evdev, cmd const[EVIOCGID], arg ptr[out, input_id])
+ioctl$EVIOCGREP(fd fd_evdev, cmd const[EVIOCGREP], arg int32)
+ioctl$EVIOCSREP(fd fd_evdev, cmd const[EVIOCSREP], arg int32)
+ioctl$EVIOCGKEYCODE(fd fd_evdev, cmd const[EVIOCGKEYCODE], arg int32)
+ioctl$EVIOCGKEYCODE_V2(fd fd_evdev, cmd const[EVIOCGKEYCODE_V2], arg ptr[inout, input_keymap_entry])
+ioctl$EVIOCSKEYCODE(fd fd_evdev, cmd const[EVIOCSKEYCODE], arg int32)
+ioctl$EVIOCSKEYCODE_V2(fd fd_evdev, cmd const[EVIOCSKEYCODE_V2], arg ptr[in, input_keymap_entry])
+ioctl$EVIOCGABS(fd fd_evdev, cmd intptr[EVIOCGABS_MIN:EVIOCGABS_MAX], arg ptr[out, input_absinfo])
+ioctl$EVIOCSABS(fd fd_evdev, cmd intptr[EVIOCSABS_MIN:EVIOCSABS_MAX], arg ptr[in, input_absinfo])
+ioctl$EVIOCSFF(fd fd_evdev, cmd const[EVIOCSFF], arg ptr[in, ff_effect])
+ioctl$EVIOCRMFF(fd fd_evdev, cmd const[EVIOCRMFF])
+ioctl$EVIOCGEFFECTS(fd fd_evdev, cmd const[EVIOCGEFFECTS], arg int32)
+ioctl$EVIOCGRAB(fd fd_evdev, cmd const[EVIOCGRAB])
+ioctl$EVIOCREVOKE(fd fd_evdev, cmd const[EVIOCREVOKE])
+ioctl$EVIOCSCLOCKID(fd fd_evdev, cmd const[EVIOCSCLOCKID], arg int32)
+ioctl$UI_DEV_CREATE(fd fd_evdev, cmd const[UI_DEV_CREATE])
+ioctl$UI_DEV_DESTROY(fd fd_evdev, cmd const[UI_DEV_DESTROY])
+ioctl$UI_DEV_SETUP(fd fd_evdev, cmd const[UI_DEV_SETUP], arg ptr[in, uinput_setup])
+ioctl$UI_ABS_SETUP(fd fd_evdev, cmd const[UI_ABS_SETUP], arg ptr[in, uinput_abs_setup])
+ioctl$UI_GET_VERSION(fd fd_evdev, cmd const[UI_GET_VERSION], arg int32)
+ioctl$UI_SET_EVBIT(fd fd_evdev, cmd const[UI_SET_EVBIT])
+ioctl$UI_SET_KEYBIT(fd fd_evdev, cmd const[UI_SET_KEYBIT])
+ioctl$UI_SET_RELBIT(fd fd_evdev, cmd const[UI_SET_RELBIT])
+ioctl$UI_SET_ABSBIT(fd fd_evdev, cmd const[UI_SET_ABSBIT])
+ioctl$UI_SET_MSCBIT(fd fd_evdev, cmd const[UI_SET_MSCBIT])
+ioctl$UI_SET_LEDBIT(fd fd_evdev, cmd const[UI_SET_LEDBIT])
+ioctl$UI_SET_SNDBIT(fd fd_evdev, cmd const[UI_SET_SNDBIT])
+ioctl$UI_SET_FFBIT(fd fd_evdev, cmd const[UI_SET_FFBIT])
+ioctl$UI_SET_PHYS(fd fd_evdev, cmd const[UI_SET_PHYS])
+ioctl$UI_SET_SWBIT(fd fd_evdev, cmd const[UI_SET_SWBIT])
+ioctl$UI_SET_PROPBIT(fd fd_evdev, cmd const[UI_SET_PROPBIT])
+ioctl$UI_BEGIN_FF_UPLOAD(fd fd_evdev, cmd const[UI_BEGIN_FF_UPLOAD], arg ptr[inout, uinput_ff_upload])
+ioctl$UI_END_FF_UPLOAD(fd fd_evdev, cmd const[UI_END_FF_UPLOAD], arg ptr[in, uinput_ff_upload])
+ioctl$UI_BEGIN_FF_ERASE(fd fd_evdev, cmd const[UI_BEGIN_FF_ERASE], arg ptr[inout, uinput_ff_erase])
+ioctl$UI_END_FF_ERASE(fd fd_evdev, cmd const[UI_END_FF_ERASE], arg ptr[in, uinput_ff_erase])
+ioctl$UI_SET_BSDUNIQ(fd fd_evdev, cmd const[UI_SET_BSDUNIQ])
+ioctl$EVIOCGNAME(fd fd_evdev, cmd const[EVIOCGNAME_CONST])
+ioctl$EVIOCGPHYS(fd fd_evdev, cmd const[EVIOCGPHYS_CONST])
+ioctl$EVIOCGUNIQ(fd fd_evdev, cmd const[EVIOCGUNIQ_CONST])
+ioctl$EVIOCGPROP(fd fd_evdev, cmd const[EVIOCGPROP_CONST])
+ioctl$EVIOCGMTSLOTS(fd fd_evdev, cmd const[EVIOCGMTSLOTS_CONST])
+ioctl$EVIOCGLED(fd fd_evdev, cmd const[EVIOCGLED_CONST])
+ioctl$EVIOCGKEY(fd fd_evdev, cmd const[EVIOCGKEY_CONST])
+ioctl$EVIOCGSND(fd fd_evdev, cmd const[EVIOCGSND_CONST])
+ioctl$EVIOCGSW(fd fd_evdev, cmd const[EVIOCGSW_CONST])
+ioctl$EVIOCGBIT(fd fd_evdev, cmd intptr[EVIOCGBIT_MIN:EVIOCGBIT_MAX])
+
+input_id {
+ bustype int16
+ vendor int16
+ product int16
+ version int16
+}
+
+input_keymap_entry {
+ flags int8
+ len int8
+ index int16
+ keycode int32
+ scancode array[int8, 32]
+}
+
+input_absinfo {
+ value int32
+ minimum int32
+ maximum int32
+ fuzz int32
+ flat int32
+ resolution int32
+}
+
+ff_effect {
+ type int16[FF_EFFECT_MIN:FF_EFFECT_MAX]
+ id int16
+ direction int16
+ trigger ff_trigger
+ replay ff_replay
+ u u
+}
+
+ff_trigger {
+ button int16
+ interval int16
+}
+
+ff_replay {
+ length int16
+ delay int16
+}
+
+ff_constant_effect {
+ level int16
+ envelope ff_envelope
+}
+
+ff_envelope {
+ attack_length len[attack_level, int16]
+ attack_level int16
+ fade_length len[fade_level, int16]
+ fade_level int16
+}
+
+ff_ramp_effect {
+ start_level int16
+ end_level int16
+ envelope ff_envelope
+}
+
+ff_periodic_effect {
+ waveform int16[FF_WAVEFORM_MIN:FF_WAVEFORM_MAX]
+ period int16
+ magnitude int16
+ offset int16
+ phase int16
+ envelope ff_envelope
+ custom_len len[custom_data, int32]
+ custom_data ptr[in, int16]
+}
+
+ff_condition_effect {
+ right_saturation int16
+ left_saturation int16
+ right_coeff int16
+ left_coeff int16
+ deadband int16
+ center int16
+}
+
+ff_rumble_effect {
+ strong_magnitude int16
+ weak_magnitude int16
+}
+
+uinput_setup {
+ id input_id
+ name array[int8, 80]
+ ff_effects_max int32
+}
+
+uinput_abs_setup {
+ code int16
+ absinfo input_absinfo
+}
+
+uinput_ff_upload {
+ request_id int32
+ retval int32
+ effect ff_effect
+ old ff_effect
+}
+
+uinput_ff_erase {
+ request_id int32
+ retval int32
+ effect_id int32
+}
+
+u [
+ constant ff_constant_effect
+ ramp ff_ramp_effect
+ periodic ff_periodic_effect
+ condition array[ff_condition_effect, 2]
+ rumble ff_rumble_effect
+]
diff --git a/sys/freebsd/evdev.txt.const b/sys/freebsd/evdev.txt.const
new file mode 100644
index 000000000..a64861e68
--- /dev/null
+++ b/sys/freebsd/evdev.txt.const
@@ -0,0 +1,59 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64
+AT_FDCWD = 18446744073709551516
+EVIOCGABS_MAX = 1075332479
+EVIOCGABS_MIN = 1075332416
+EVIOCGBIT_MAX = 1073759551
+EVIOCGBIT_MIN = 1073759520
+EVIOCGEFFECTS = 1074021764
+EVIOCGID = 1074283778
+EVIOCGKEYCODE = 3221767428
+EVIOCGKEYCODE_V2 = 3223864580
+EVIOCGKEY_CONST = 1073759512
+EVIOCGLED_CONST = 1073759513
+EVIOCGMTSLOTS_CONST = 3221243146
+EVIOCGNAME_CONST = 1073759494
+EVIOCGPHYS_CONST = 1073759495
+EVIOCGPROP_CONST = 1073759497
+EVIOCGRAB = 537150864
+EVIOCGREP = 1074283779
+EVIOCGSND_CONST = 1073759514
+EVIOCGSW_CONST = 1073759515
+EVIOCGUNIQ_CONST = 1073759496
+EVIOCGVERSION = 1074021633
+EVIOCREVOKE = 537150865
+EVIOCRMFF = 537150849
+EVIOCSABS_MAX = 1075332479
+EVIOCSABS_MIN = 1075332416
+EVIOCSCLOCKID = 2147763616
+EVIOCSFF = 2150647168
+EVIOCSKEYCODE = 2148025604
+EVIOCSKEYCODE_V2 = 2150122756
+EVIOCSREP = 2148025603
+FF_EFFECT_MAX = 87
+FF_EFFECT_MIN = 80
+FF_WAVEFORM_MAX = 93
+FF_WAVEFORM_MIN = 88
+SYS_ioctl = 54
+SYS_openat = 499
+UI_ABS_SETUP = 2149340420
+UI_BEGIN_FF_ERASE = 3222033866
+UI_BEGIN_FF_UPLOAD = 3228063176
+UI_DEV_CREATE = 536892673
+UI_DEV_DESTROY = 536892674
+UI_DEV_SETUP = 2153534723
+UI_END_FF_ERASE = 2148292043
+UI_END_FF_UPLOAD = 2154321353
+UI_GET_VERSION = 1074025773
+UI_SET_ABSBIT = 537154919
+UI_SET_BSDUNIQ = 536892781
+UI_SET_EVBIT = 537154916
+UI_SET_FFBIT = 537154923
+UI_SET_KEYBIT = 537154917
+UI_SET_LEDBIT = 537154921
+UI_SET_MSCBIT = 537154920
+UI_SET_PHYS = 536892780
+UI_SET_PROPBIT = 537154926
+UI_SET_RELBIT = 537154918
+UI_SET_SNDBIT = 537154922
+UI_SET_SWBIT = 537154925