1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NVIF_IOCTL_H__ 3 #define __NVIF_IOCTL_H__ 4 5 #define NVIF_VERSION_LATEST 0x0000000000000100ULL 6 7 struct nvif_ioctl_v0 { 8 __u8 version; 9 #define NVIF_IOCTL_V0_NOP 0x00 10 #define NVIF_IOCTL_V0_SCLASS 0x01 11 #define NVIF_IOCTL_V0_NEW 0x02 12 #define NVIF_IOCTL_V0_DEL 0x03 13 #define NVIF_IOCTL_V0_MTHD 0x04 14 #define NVIF_IOCTL_V0_RD 0x05 15 #define NVIF_IOCTL_V0_WR 0x06 16 #define NVIF_IOCTL_V0_MAP 0x07 17 #define NVIF_IOCTL_V0_UNMAP 0x08 18 __u8 type; 19 __u8 pad02[4]; 20 #define NVIF_IOCTL_V0_OWNER_NVIF 0x00 21 #define NVIF_IOCTL_V0_OWNER_ANY 0xff 22 __u8 owner; 23 #define NVIF_IOCTL_V0_ROUTE_NVIF 0x00 24 #define NVIF_IOCTL_V0_ROUTE_HIDDEN 0xff 25 __u8 route; 26 __u64 token; 27 __u64 object; 28 __u8 data[]; /* ioctl data (below) */ 29 }; 30 31 struct nvif_ioctl_nop_v0 { 32 __u64 version; 33 }; 34 35 struct nvif_ioctl_sclass_v0 { 36 /* nvif_ioctl ... */ 37 __u8 version; 38 __u8 count; 39 __u8 pad02[6]; 40 struct nvif_ioctl_sclass_oclass_v0 { 41 __s32 oclass; 42 __s16 minver; 43 __s16 maxver; 44 } oclass[]; 45 }; 46 47 struct nvif_ioctl_new_v0 { 48 /* nvif_ioctl ... */ 49 __u8 version; 50 __u8 pad01[6]; 51 __u8 route; 52 __u64 token; 53 __u64 object; 54 __u32 handle; 55 __s32 oclass; 56 __u8 data[]; /* class data (class.h) */ 57 }; 58 59 struct nvif_ioctl_del { 60 }; 61 62 struct nvif_ioctl_mthd_v0 { 63 /* nvif_ioctl ... */ 64 __u8 version; 65 __u8 method; 66 __u8 pad02[6]; 67 __u8 data[]; /* method data (class.h) */ 68 }; 69 70 struct nvif_ioctl_rd_v0 { 71 /* nvif_ioctl ... */ 72 __u8 version; 73 __u8 size; 74 __u8 pad02[2]; 75 __u32 data; 76 __u64 addr; 77 }; 78 79 struct nvif_ioctl_wr_v0 { 80 /* nvif_ioctl ... */ 81 __u8 version; 82 __u8 size; 83 __u8 pad02[2]; 84 __u32 data; 85 __u64 addr; 86 }; 87 88 struct nvif_ioctl_map_v0 { 89 /* nvif_ioctl ... */ 90 __u8 version; 91 #define NVIF_IOCTL_MAP_V0_IO 0x00 92 #define NVIF_IOCTL_MAP_V0_VA 0x01 93 __u8 type; 94 __u8 pad02[6]; 95 __u64 handle; 96 __u64 length; 97 __u8 data[]; 98 }; 99 100 struct nvif_ioctl_unmap { 101 }; 102 #endif 103