ioctl.h 3.1 KB

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