Home | History | Annotate | Line # | Download | only in nvif
ioctl.h revision 1.1.1.2
      1 /*	$NetBSD: ioctl.h,v 1.1.1.2 2021/12/18 20:15:37 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVIF_IOCTL_H__
      5 #define __NVIF_IOCTL_H__
      6 
      7 #define NVIF_VERSION_LATEST                               0x0000000000000100ULL
      8 
      9 struct nvif_ioctl_v0 {
     10 	__u8  version;
     11 #define NVIF_IOCTL_V0_NOP                                                  0x00
     12 #define NVIF_IOCTL_V0_SCLASS                                               0x01
     13 #define NVIF_IOCTL_V0_NEW                                                  0x02
     14 #define NVIF_IOCTL_V0_DEL                                                  0x03
     15 #define NVIF_IOCTL_V0_MTHD                                                 0x04
     16 #define NVIF_IOCTL_V0_RD                                                   0x05
     17 #define NVIF_IOCTL_V0_WR                                                   0x06
     18 #define NVIF_IOCTL_V0_MAP                                                  0x07
     19 #define NVIF_IOCTL_V0_UNMAP                                                0x08
     20 #define NVIF_IOCTL_V0_NTFY_NEW                                             0x09
     21 #define NVIF_IOCTL_V0_NTFY_DEL                                             0x0a
     22 #define NVIF_IOCTL_V0_NTFY_GET                                             0x0b
     23 #define NVIF_IOCTL_V0_NTFY_PUT                                             0x0c
     24 	__u8  type;
     25 	__u8  pad02[4];
     26 #define NVIF_IOCTL_V0_OWNER_NVIF                                           0x00
     27 #define NVIF_IOCTL_V0_OWNER_ANY                                            0xff
     28 	__u8  owner;
     29 #define NVIF_IOCTL_V0_ROUTE_NVIF                                           0x00
     30 #define NVIF_IOCTL_V0_ROUTE_HIDDEN                                         0xff
     31 	__u8  route;
     32 	__u64 token;
     33 	__u64 object;
     34 	__u8  data[];		/* ioctl data (below) */
     35 };
     36 
     37 struct nvif_ioctl_nop_v0 {
     38 	__u64 version;
     39 };
     40 
     41 struct nvif_ioctl_sclass_v0 {
     42 	/* nvif_ioctl ... */
     43 	__u8  version;
     44 	__u8  count;
     45 	__u8  pad02[6];
     46 	struct nvif_ioctl_sclass_oclass_v0 {
     47 		__s32 oclass;
     48 		__s16 minver;
     49 		__s16 maxver;
     50 	} oclass[];
     51 };
     52 
     53 struct nvif_ioctl_new_v0 {
     54 	/* nvif_ioctl ... */
     55 	__u8  version;
     56 	__u8  pad01[6];
     57 	__u8  route;
     58 	__u64 token;
     59 	__u64 object;
     60 	__u32 handle;
     61 	__s32 oclass;
     62 	__u8  data[];		/* class data (class.h) */
     63 };
     64 
     65 struct nvif_ioctl_del {
     66 };
     67 
     68 struct nvif_ioctl_rd_v0 {
     69 	/* nvif_ioctl ... */
     70 	__u8  version;
     71 	__u8  size;
     72 	__u8  pad02[2];
     73 	__u32 data;
     74 	__u64 addr;
     75 };
     76 
     77 struct nvif_ioctl_wr_v0 {
     78 	/* nvif_ioctl ... */
     79 	__u8  version;
     80 	__u8  size;
     81 	__u8  pad02[2];
     82 	__u32 data;
     83 	__u64 addr;
     84 };
     85 
     86 struct nvif_ioctl_map_v0 {
     87 	/* nvif_ioctl ... */
     88 	__u8  version;
     89 #define NVIF_IOCTL_MAP_V0_IO                                               0x00
     90 #define NVIF_IOCTL_MAP_V0_VA                                               0x01
     91 	__u8  type;
     92 	__u8  pad02[6];
     93 	__u64 handle;
     94 	__u64 length;
     95 	__u8  data[];
     96 };
     97 
     98 struct nvif_ioctl_unmap {
     99 };
    100 
    101 struct nvif_ioctl_ntfy_new_v0 {
    102 	/* nvif_ioctl ... */
    103 	__u8  version;
    104 	__u8  event;
    105 	__u8  index;
    106 	__u8  pad03[5];
    107 	__u8  data[];		/* event request data (event.h) */
    108 };
    109 
    110 struct nvif_ioctl_ntfy_del_v0 {
    111 	/* nvif_ioctl ... */
    112 	__u8  version;
    113 	__u8  index;
    114 	__u8  pad02[6];
    115 };
    116 
    117 struct nvif_ioctl_ntfy_get_v0 {
    118 	/* nvif_ioctl ... */
    119 	__u8  version;
    120 	__u8  index;
    121 	__u8  pad02[6];
    122 };
    123 
    124 struct nvif_ioctl_ntfy_put_v0 {
    125 	/* nvif_ioctl ... */
    126 	__u8  version;
    127 	__u8  index;
    128 	__u8  pad02[6];
    129 };
    130 
    131 struct nvif_ioctl_mthd_v0 {
    132 	/* nvif_ioctl ... */
    133 	__u8  version;
    134 	__u8  method;
    135 	__u8  pad02[6];
    136 	__u8  data[];		/* method data (class.h) */
    137 };
    138 
    139 #endif
    140