diff options
| author | Anton Lindqvist <anton@basename.se> | 2019-06-05 21:12:10 +0200 |
|---|---|---|
| committer | Greg Steuck <blackgnezdo@gmail.com> | 2019-06-05 19:18:58 -0700 |
| commit | 6354390a826632cb9aa5bfebc93f4e30ae1b5a0f (patch) | |
| tree | 6965e93bb5cb9c6485ab07606f1976a297c2f192 /sys | |
| parent | a547defcdc2fffb71a997c3bff70cecbc1572c3d (diff) | |
sys/openbsd: add missing wsmouse ioctl descriptions
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/openbsd/gen/amd64.go | 72 | ||||
| -rw-r--r-- | sys/openbsd/wscons.txt | 30 | ||||
| -rw-r--r-- | sys/openbsd/wscons_amd64.const | 8 |
3 files changed, 109 insertions, 1 deletions
diff --git a/sys/openbsd/gen/amd64.go b/sys/openbsd/gen/amd64.go index 7176c2e6c..551c508ed 100644 --- a/sys/openbsd/gen/amd64.go +++ b/sys/openbsd/gen/amd64.go @@ -703,6 +703,43 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "fontwidth", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "fontheight", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "wsmouse_calibcoord"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_calibcoord", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "rawx", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "rawy", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "x", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "y", TypeSize: 4}}}, + }}}, + {Key: StructKey{Name: "wsmouse_calibcoord", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_calibcoord", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "rawx", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "rawy", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "x", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "y", TypeSize: 4, ArgDir: 1}}}, + }}}, + {Key: StructKey{Name: "wsmouse_calibcoords"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_calibcoords", TypeSize: 288}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "minx", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "miny", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "maxx", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "maxy", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "swapxy", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resx", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resy", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "samplelen", TypeSize: 4}}, Path: []string{"samples"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "samples", TypeSize: 256}, Type: &StructType{Key: StructKey{Name: "wsmouse_calibcoord"}}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + }}}, + {Key: StructKey{Name: "wsmouse_calibcoords", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_calibcoords", TypeSize: 288, ArgDir: 1}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "minx", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "miny", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "maxx", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "maxy", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "swapxy", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resx", TypeSize: 4, ArgDir: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resy", TypeSize: 4, ArgDir: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "samplelen", TypeSize: 4, ArgDir: 1}}, Path: []string{"samples"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "samples", TypeSize: 256, ArgDir: 1}, Type: &StructType{Key: StructKey{Name: "wsmouse_calibcoord", Dir: 1}}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + }}}, + {Key: StructKey{Name: "wsmouse_mode"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_mode", TypeSize: 4}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wsmouse_mode_flags", FldName: "mode", TypeSize: 4}}, Vals: []uint64{0, 1}, BitMask: true}, + }}}, {Key: StructKey{Name: "wsmouse_param"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "wsmouse_param", TypeSize: 8}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wsmousecfg_flags", FldName: "key", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 64, 65, 66, 67, 68, 69, 70, 71, 72, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 256, 257}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "value", TypeSize: 4}}}, @@ -1565,16 +1602,41 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147768083}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wskbd_mode_flags", TypeSize: 4}}, Vals: []uint64{1}, BitMask: true}}, }}, + {NR: 54, Name: "ioctl$WSMOUSEIO_GCALIBCOORDS", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1092638501}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "wsmouse_calibcoords", Dir: 1}}}, + }}, {NR: 54, Name: "ioctl$WSMOUSEIO_GETPARAMS", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148554535}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "wsmouse_parameters", Dir: 1}}}, }}, + {NR: 54, Name: "ioctl$WSMOUSEIO_GTYPE", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074026272}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}}, + }}, + {NR: 54, Name: "ioctl$WSMOUSEIO_SCALIBCOORDS", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2166380324}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "wsmouse_calibcoords"}}}, + }}, + {NR: 54, Name: "ioctl$WSMOUSEIO_SETMODE", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147768102}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "wsmouse_mode"}}}, + }}, {NR: 54, Name: "ioctl$WSMOUSEIO_SETPARAMS", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148554536}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "wsmouse_parameters"}}}, }}, + {NR: 54, Name: "ioctl$WSMOUSEIO_SRES", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsmouse", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147768097}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + }}, {NR: 54, Name: "ioctl$WSMUXIO_ADD_DEVICE", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_wsdisplay", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148030305}, @@ -2859,8 +2921,16 @@ var consts_amd64 = []ConstValue{ {Name: "WSMOUSECFG_X_INV", Value: 6}, {Name: "WSMOUSECFG_Y_HYSTERESIS", Value: 35}, {Name: "WSMOUSECFG_Y_INV", Value: 7}, + {Name: "WSMOUSEIO_GCALIBCOORDS", Value: 1092638501}, {Name: "WSMOUSEIO_GETPARAMS", Value: 2148554535}, + {Name: "WSMOUSEIO_GTYPE", Value: 1074026272}, + {Name: "WSMOUSEIO_SCALIBCOORDS", Value: 2166380324}, + {Name: "WSMOUSEIO_SETMODE", Value: 2147768102}, {Name: "WSMOUSEIO_SETPARAMS", Value: 2148554536}, + {Name: "WSMOUSEIO_SRES", Value: 2147768097}, + {Name: "WSMOUSE_CALIBCOORDS_MAX", Value: 16}, + {Name: "WSMOUSE_COMPAT"}, + {Name: "WSMOUSE_NATIVE", Value: 1}, {Name: "WSMUXIO_ADD_DEVICE", Value: 2148030305}, {Name: "WSMUXIO_INJECTEVENT", Value: 2149078880}, {Name: "WSMUXIO_LIST_DEVICES", Value: 3238287203}, @@ -2875,4 +2945,4 @@ var consts_amd64 = []ConstValue{ {Name: "__MAP_NOREPLACE", Value: 2048}, } -const revision_amd64 = "1f7a33a955602d488b0c3f964b983c9f8baf75a3" +const revision_amd64 = "25b5d4aba6e9c263a9a1612d0fdf90ba439178fe" diff --git a/sys/openbsd/wscons.txt b/sys/openbsd/wscons.txt index e93d6819e..674a5b47e 100644 --- a/sys/openbsd/wscons.txt +++ b/sys/openbsd/wscons.txt @@ -60,8 +60,13 @@ resource fd_wsmouse[fd] openat$wsmouse(fd const[AT_FDCWD], file ptr[in, string["/dev/wsmouse0"]], flags flags[open_flags], mode const[0]) fd_wsmouse +ioctl$WSMOUSEIO_GCALIBCOORDS(fd fd_wsmouse, cmd const[WSMOUSEIO_GCALIBCOORDS], arg ptr[out, wsmouse_calibcoords]) ioctl$WSMOUSEIO_GETPARAMS(fd fd_wsmouse, cmd const[WSMOUSEIO_GETPARAMS], arg ptr[out, wsmouse_parameters]) +ioctl$WSMOUSEIO_GTYPE(fd fd_wsmouse, cmd const[WSMOUSEIO_GTYPE], arg ptr[out, int32]) +ioctl$WSMOUSEIO_SCALIBCOORDS(fd fd_wsmouse, cmd const[WSMOUSEIO_SCALIBCOORDS], arg ptr[in, wsmouse_calibcoords]) +ioctl$WSMOUSEIO_SETMODE(fd fd_wsmouse, cmd const[WSMOUSEIO_SETMODE], arg ptr[in, wsmouse_mode]) ioctl$WSMOUSEIO_SETPARAMS(fd fd_wsmouse, cmd const[WSMOUSEIO_SETPARAMS], arg ptr[in, wsmouse_parameters]) +ioctl$WSMOUSEIO_SRES(fd fd_wsmouse, cmd const[WSMOUSEIO_SRES], arg ptr[in, int32]) resource fd_wsmux[fd] @@ -135,6 +140,29 @@ wsdisplay_screentype { fontheight int32 } +wsmouse_calibcoord { + rawx int32 + rawy int32 + x int32 + y int32 +} + +wsmouse_calibcoords { + minx int32 + miny int32 + maxx int32 + maxy int32 + swapxy int32 + resx int32 + resy int32 + samplelen len[samples, int32] + samples array[wsmouse_calibcoord, WSMOUSE_CALIBCOORDS_MAX] +} + +wsmouse_mode { + mode flags[wsmouse_mode_flags, int32] +} + wsmouse_param { key flags[wsmousecfg_flags, int32] value int32 @@ -197,6 +225,8 @@ wsdisplay_svideo_flags = WSDISPLAYIO_VIDEO_OFF, WSDISPLAYIO_VIDEO_ON wsdisplay_burner_flags = WSDISPLAY_BURN_VBLANK, WSDISPLAY_BURN_KBD, WSDISPLAY_BURN_MOUSE, WSDISPLAY_BURN_OUTPUT +wsmouse_mode_flags = WSMOUSE_COMPAT, WSMOUSE_NATIVE + wsmousecfg_flags = WSMOUSECFG_DX_SCALE, WSMOUSECFG_DY_SCALE, WSMOUSECFG_PRESSURE_LO, WSMOUSECFG_PRESSURE_HI, WSMOUSECFG_TRKMAXDIST, WSMOUSECFG_SWAPXY, WSMOUSECFG_X_INV, WSMOUSECFG_Y_INV, WSMOUSECFG_DX_MAX, WSMOUSECFG_DY_MAX, WSMOUSECFG_X_HYSTERESIS, WSMOUSECFG_Y_HYSTERESIS, WSMOUSECFG_DECELERATION, WSMOUSECFG_STRONG_HYSTERESIS, WSMOUSECFG_SMOOTHING, WSMOUSECFG_SOFTBUTTONS, WSMOUSECFG_SOFTMBTN, WSMOUSECFG_TOPBUTTONS, WSMOUSECFG_TWOFINGERSCROLL, WSMOUSECFG_EDGESCROLL, WSMOUSECFG_HORIZSCROLL, WSMOUSECFG_SWAPSIDES, WSMOUSECFG_DISABLE, WSMOUSECFG_TAPPING, WSMOUSECFG_LEFT_EDGE, WSMOUSECFG_RIGHT_EDGE, WSMOUSECFG_TOP_EDGE, WSMOUSECFG_BOTTOM_EDGE, WSMOUSECFG_CENTERWIDTH, WSMOUSECFG_HORIZSCROLLDIST, WSMOUSECFG_VERTSCROLLDIST, WSMOUSECFG_F2WIDTH, WSMOUSECFG_F2PRESSURE, WSMOUSECFG_TAP_MAXTIME, WSMOUSECFG_TAP_CLICKTIME, WSMOUSECFG_TAP_LOCKTIME, WSMOUSECFG_LOG_INPUT, WSMOUSECFG_LOG_EVENTS wsmux_device_flags = WSMUX_MOUSE, WSMUX_KBD, WSMUX_MUX diff --git a/sys/openbsd/wscons_amd64.const b/sys/openbsd/wscons_amd64.const index 71a590849..5110bb504 100644 --- a/sys/openbsd/wscons_amd64.const +++ b/sys/openbsd/wscons_amd64.const @@ -105,8 +105,16 @@ WSMOUSECFG_X_HYSTERESIS = 34 WSMOUSECFG_X_INV = 6 WSMOUSECFG_Y_HYSTERESIS = 35 WSMOUSECFG_Y_INV = 7 +WSMOUSEIO_GCALIBCOORDS = 1092638501 WSMOUSEIO_GETPARAMS = 2148554535 +WSMOUSEIO_GTYPE = 1074026272 +WSMOUSEIO_SCALIBCOORDS = 2166380324 +WSMOUSEIO_SETMODE = 2147768102 WSMOUSEIO_SETPARAMS = 2148554536 +WSMOUSEIO_SRES = 2147768097 +WSMOUSE_CALIBCOORDS_MAX = 16 +WSMOUSE_COMPAT = 0 +WSMOUSE_NATIVE = 1 WSMUXIO_ADD_DEVICE = 2148030305 WSMUXIO_INJECTEVENT = 2149078880 WSMUXIO_LIST_DEVICES = 3238287203 |
