Changes

Jump to navigation Jump to search
708 bytes removed ,  01:42, 13 November 2017
no edit summary
Line 167: Line 167:     
   struct {
 
   struct {
     u32 __id;     // in
+
     __in  u32 id;
     u32 __value;   // out
+
     __out u32 value;
 
   };
 
   };
   Line 175: Line 175:     
   struct {
 
   struct {
     u32 __id;     // in
+
     __in u32 id;
 
   };
 
   };
   Line 182: Line 182:     
   struct {
 
   struct {
     u32 __id;         // in
+
     __in u32 id;
     u32 __thresh;     // in
+
     __in u32 thresh;
     s32 __timeout;     // in
+
     __in s32 timeout;
 
   };
 
   };
   Line 191: Line 191:     
   struct {
 
   struct {
     u32 __id;         // in
+
     __in u32 id;
     u32 __lock;        // in (0==unlock; 1==lock)
+
     __in u32 lock;        // (0==unlock; 1==lock)
 
   };
 
   };
   Line 199: Line 199:     
   struct {
 
   struct {
     u32 __id;           // in
+
     __in u32 id;
     u32 __num_offsets; // in
+
     __in u32 num_offsets;
     u32 __block_size;   // in
+
     __in u32 block_size;
     u32 __offsets;     // in
+
     __in u32 offsets;
     u32 __values;       // in
+
     __in u32 values;
     u32 __write;       // in
+
     __in u32 write;
 
   };
 
   };
   Line 211: Line 211:     
   struct {
 
   struct {
     u32 __id;         // in
+
     __in  u32 id;
     u32 __thresh;     // in
+
     __in  u32 thresh;
     s32 __timeout;     // in
+
     __in  s32 timeout;
     u32 __value;       // out
+
     __out u32 value;
 
   };
 
   };
   Line 221: Line 221:     
   struct {
 
   struct {
     u32 __id;     // in
+
     __in  u32 id;
     u32 __value;   // out
+
     __out u32 value;
 
   };
 
   };
   Line 229: Line 229:     
   struct {
 
   struct {
     u32 __event_id;      // in (ranges from 0x01 to 0x3F)
+
     __in u32 event_id;      // ranges from 0x01 to 0x3F
 
   };
 
   };
   Line 236: Line 236:     
   struct {
 
   struct {
     u32 __unk0;         // in
+
     __in    u32 unk0;
     u32 __unk1;         // in
+
     __in    u32 unk1;
     s32 __timeout;     // in
+
     __in    s32 __timeout;
     u32 __event;       // inout (in=event_id; out=result)
+
     __inout u32 __event;   // in=event_id; out=result
 
   };
 
   };
   Line 246: Line 246:     
   struct {
 
   struct {
     u32 __unk0;         // in
+
     __in    u32 unk0;
     u32 __unk1;         // in
+
     __in    u32 unk1;
     s32 __timeout;     // in
+
     __in    s32 timeout;
     u32 __event;       // inout (in=event_id; out=result)
+
     __inout u32 event;     // in=event_id; out=result
 
   };
 
   };
   Line 256: Line 256:     
   struct {
 
   struct {
     u32 __event_id;      // in (ranges from 0x01 to 0x3F)
+
     __in u32 event_id;      // ranges from 0x01 to 0x3F
 
   };
 
   };
   Line 263: Line 263:     
   struct {
 
   struct {
     u32 __event_id;      // in (ranges from 0x01 to 0x3F)
+
     __in u32 event_id;      // ranges from 0x01 to 0x3F
 
   };
 
   };
   Line 270: Line 270:     
   struct {
 
   struct {
     u64 __events;      // in (64-bit flag where each bit represents one event)
+
     __in u64 events;      // 64-bit bitfield where each bit represents one event
 
   };
 
   };
   Line 316: Line 316:     
   struct {
 
   struct {
     u32 __size;   // in
+
     __in  u32 size;
     u32 __handle; // out
+
     __out u32 handle;
 
   };
 
   };
   Line 324: Line 324:     
   struct {
 
   struct {
     u32 __id;     // in
+
     __in  u32 id;
     u32 __handle; // out
+
     __out u32 handle;
 
   };
 
   };
   Line 332: Line 332:     
   struct {
 
   struct {
     u32 __handle;   // in
+
     __in u32 handle;
     u32 __heapmask; // in
+
     __in u32 heapmask;
     u32 __flags;    // in (0=read-only, 1=read-write)
+
     __in u32 flags;    // (0=read-only, 1=read-write)
     u32 __align;   // in
+
     __in u32 align;
     u8  __kind;     // in
+
     __in u8  kind;
     u8 __pad[7];
+
     u8       pad[7];
     u64 __addr;     // in
+
     __in u64 addr;
 
   };
 
   };
   Line 345: Line 345:     
   struct {
 
   struct {
     u32 __handle;   // in
+
     __in  u32 handle;
     u32 __pad;
+
     u32       pad;
     u64 __refcount; // out
+
     __out u64 refcount;
     u32 __size;     // out
+
     __out u32 size;
     u32 __flags;    // out, 1=NOT_FREED_YET
+
     __out u32 flags;    // 1=NOT_FREED_YET
 
   };
 
   };
   Line 356: Line 356:     
   struct {
 
   struct {
     u32 __handle; // in
+
     __in  u32 handle;
     u32 __param;  // in, 1=SIZE, 2=ALIGNMENT, 3=BASE (returns error), 4=HEAP (always 0x40000000), 5=KIND, 6=COMPR (unused)
+
     __in  u32 param;  // 1=SIZE, 2=ALIGNMENT, 3=BASE (returns error), 4=HEAP (always 0x40000000), 5=KIND, 6=COMPR (unused)
     u32 __result; // out
+
     __out u32 result;
 
   };
 
   };
   Line 365: Line 365:     
   struct {
 
   struct {
     u32 __id;     // out
+
     __out u32 id;
     u32 __handle; // in
+
     __in  u32 handle;
 
   };
 
   };
   Line 566: Line 566:     
   struct {
 
   struct {
     u32 __fd; // in
+
     __in u32 fd;
 
   };
 
   };
   Line 573: Line 573:     
   struct {
 
   struct {
     u32 __pages;     // in
+
     __in u32 pages;
     u32 __page_size; // in
+
     __in u32 page_size;
     u32 __flags;     // in
+
     __in u32 flags;
     u32 __pad;
+
     u32     pad;
 
     union {
 
     union {
       u64 __offset; // out
+
       __out u64 offset;
       u64 __align;   // in
+
       __in  u64 align;
 
     };
 
     };
 
   };
 
   };
Line 585: Line 585:  
=== NVGPU_AS_IOCTL_FREE_SPACE ===
 
=== NVGPU_AS_IOCTL_FREE_SPACE ===
 
   struct {
 
   struct {
     u64 __offset;   // in
+
     __in u64 offset;
     u32 __pages;     // in
+
     __in u32 pages;
     u32 __page_size; // in
+
     __in u32 page_size;
 
   };
 
   };
   Line 596: Line 596:     
   struct {
 
   struct {
     u32 __flags;        // in, bit0: fixed_offset, bit2: cacheable
+
     __in    u32 flags;        // bit0: fixed_offset, bit2: cacheable
     u32 __reserved;
+
     u32         pad;
     u32 __nvmap_handle; // in
+
     __in    u32 nvmap_handle;
     u32 __page_size;    // inout, 0 means don't care
+
     __inout u32 page_size;    // 0 means don't care
 
     union {
 
     union {
       u64 __offset;     // out
+
       __out u64 offset;
       u64 __align;     // in
+
       __in  u64 align;
 
     };
 
     };
 
   };
 
   };
Line 612: Line 612:     
   struct {
 
   struct {
     u32 __flags;          // in, 4 works
+
     __in    u32 flags;          // bit0: fixed_offset, bit2: cacheable
     u32 __kind;          // in, -1 is default
+
     __in    u32 kind;          // -1 is default
     u32 __nvmap_handle;   // in
+
     __in    u32 nvmap_handle;
     u32 __page_size;      // inout, 0 means don't care
+
     __inout u32 page_size;      // 0 means don't care
     u64 __buffer_offset; // in
+
     __in    u64 buffer_offset;
     u64 __mapping_size;   // in
+
     __in    u64 mapping_size;
     u64 __offset;         // out
+
     __out  u64 offset;
 
   };
 
   };
   Line 628: Line 628:     
   struct {
 
   struct {
     u32 __big_page_size;  // in (depends on GPU's available_big_page_sizes; 0=default)
+
     __in u32 big_page_size;  // depends on GPU's available_big_page_sizes; 0=default
     s32 __as_fd;          // in (ignored; passes 0)
+
     __in s32 as_fd;          // ignored; passes 0
     u32 __flags;          // in (ignored; passes 0)
+
     __in u32 flags;          // ignored; passes 0
     u32 __reserved;        // in (ignored; passes 0)
+
     __in u32 reserved;        // ignored; passes 0
 
   };
 
   };
   Line 638: Line 638:     
   struct va_region {
 
   struct va_region {
     u64 __offset;
+
     u64 offset;
     u32 __page_size;
+
     u32 page_size;
     u32 __reserved;
+
     u32 pad;
     u64 __pages;
+
     u64 pages;
 
   };
 
   };
 
    
 
    
 
   struct {
 
   struct {
     u64             __not_used;  // (contained output user ptr on linux, ignored)
+
     u64         not_used;  // (contained output user ptr on linux, ignored)
     u32             __bufsize;    // inout, forced to 2*sizeof(struct va_region)
+
     __inout u32 bufsize;    // forced to 2*sizeof(struct va_region)
     u32             __reserved;
+
     u32         pad;
     struct va_region __regions[2]; // out
+
     __out struct va_region regions[2];
 
   };
 
   };
   Line 655: Line 655:     
   struct {
 
   struct {
     u32 __big_page_size;  // in (depends on GPU's available_big_page_sizes; 0=default)
+
     __in u32 big_page_size;  // depends on GPU's available_big_page_sizes; 0=default
     s32 __as_fd;          // in (ignored; passes 0)
+
     __in s32 as_fd;          // ignored; passes 0
     u32 __flags;          // in (ignored; passes 0)
+
     __in u32 flags;          // ignored; passes 0
     u32 __reserved;        // in (ignored; passes 0)
+
     __in u32 reserved;        // ignored; passes 0
     u64 __unk0;           // in
+
     __in u64 unk0;
     u64 __unk1;           // in
+
     __in u64 unk1;
     u64 __unk2;           // in
+
     __in u64 unk2;
 
   };
 
   };
   Line 744: Line 744:  
Returns the GPU characteristics. Modified to return inline data instead of using a pointer.
 
Returns the GPU characteristics. Modified to return inline data instead of using a pointer.
   −
   struct __gpu_characteristics {
+
   struct gpu_characteristics {
     u32 __arch;                          // 0x120 (NVGPU_GPU_ARCH_GM200)
+
     u32 arch;                          // 0x120 (NVGPU_GPU_ARCH_GM200)
     u32 __impl;                          // 0xB (NVGPU_GPU_IMPL_GM20B)
+
     u32 impl;                          // 0xB (NVGPU_GPU_IMPL_GM20B)
     u32 __rev;                            // 0xA1 (Revision A1)
+
     u32 rev;                            // 0xA1 (Revision A1)
     u32 __num_gpc;                        // 0x1
+
     u32 num_gpc;                        // 0x1
     u64 __L2_cache_size;                  // 0x40000
+
     u64 l2_cache_size;                  // 0x40000
     u64 __on_board_video_memory_size;    // 0x0 (not used)
+
     u64 on_board_video_memory_size;    // 0x0 (not used)
     u32 __num_tpc_per_gpc;                // 0x2
+
     u32 num_tpc_per_gpc;                // 0x2
     u32 __bus_type;                      // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)
+
     u32 bus_type;                      // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)
     u32 __big_page_size;                  // 0x20000
+
     u32 big_page_size;                  // 0x20000
     u32 __compression_page_size;          // 0x20000
+
     u32 compression_page_size;          // 0x20000
     u32 __pde_coverage_bit_count;        // 0x1B
+
     u32 pde_coverage_bit_count;        // 0x1B
     u32 __available_big_page_sizes;      // 0x30000
+
     u32 available_big_page_sizes;      // 0x30000
     u32 __gpc_mask;                      // 0x1
+
     u32 gpc_mask;                      // 0x1
     u32 __sm_arch_sm_version;            // 0x503 (Maxwell Generation 5.0.3?)
+
     u32 sm_arch_sm_version;            // 0x503 (Maxwell Generation 5.0.3?)
     u32 __sm_arch_spa_version;            // 0x503 (Maxwell Generation 5.0.3?)
+
     u32 sm_arch_spa_version;            // 0x503 (Maxwell Generation 5.0.3?)
     u32 __sm_arch_warp_count;            // 0x80
+
     u32 sm_arch_warp_count;            // 0x80
     u32 __gpu_va_bit_count;              // 0x28
+
     u32 gpu_va_bit_count;              // 0x28
     u32 __reserved;                      // NULL
+
     u32 reserved;                      // NULL
     u64 __flags;                          // 0x55
+
     u64 flags;                          // 0x55
     u32 __twod_class;                    // 0x902D (FERMI_TWOD_A)
+
     u32 twod_class;                    // 0x902D (FERMI_TWOD_A)
     u32 __threed_class;                  // 0xB197 (MAXWELL_B)
+
     u32 threed_class;                  // 0xB197 (MAXWELL_B)
     u32 __compute_class;                  // 0xB1C0 (MAXWELL_COMPUTE_B)
+
     u32 compute_class;                  // 0xB1C0 (MAXWELL_COMPUTE_B)
     u32 __gpfifo_class;                  // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)
+
     u32 gpfifo_class;                  // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)
     u32 __inline_to_memory_class;        // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)
+
     u32 inline_to_memory_class;        // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)
     u32 __dma_copy_class;                // 0xB0B5 (MAXWELL_DMA_COPY_A)
+
     u32 dma_copy_class;                // 0xB0B5 (MAXWELL_DMA_COPY_A)
     u32 __max_fbps_count;                // 0x1
+
     u32 max_fbps_count;                // 0x1
     u32 __fbp_en_mask;                    // 0x0 (disabled)
+
     u32 fbp_en_mask;                    // 0x0 (disabled)
     u32 __max_ltc_per_fbp;                // 0x2
+
     u32 max_ltc_per_fbp;                // 0x2
     u32 __max_lts_per_ltc;                // 0x1
+
     u32 max_lts_per_ltc;                // 0x1
     u32 __max_tex_per_tpc;                // 0x0 (not supported)
+
     u32 max_tex_per_tpc;                // 0x0 (not supported)
     u32 __max_gpc_count;                  // 0x1
+
     u32 max_gpc_count;                  // 0x1
     u32 __rop_l2_en_mask_0;              // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)
+
     u32 rop_l2_en_mask_0;              // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)
     u32 __rop_l2_en_mask_1;              // 0x0
+
     u32 rop_l2_en_mask_1;              // 0x0
     u64 __chipname;                      // 0x6230326D67 ("gm20b")
+
     u64 chipname;                      // 0x6230326D67 ("gm20b")
     u64 __gr_compbit_store_base_hw;      // 0x0 (not supported)
+
     u64 gr_compbit_store_base_hw;      // 0x0 (not supported)
 
   };
 
   };
 
   
 
   
 
   struct {
 
   struct {
     u64 __gpu_characteristics_buf_size;  // in/out (must not be NULL, but gets overwritten with 0xA0=max_size)
+
     __inout u64 gpu_characteristics_buf_size;  // must not be NULL, but gets overwritten with 0xA0=max_size
     u64 __gpu_characteristics_buf_addr;  // in (ignored, but must not be NULL)
+
     __in    u64 gpu_characteristics_buf_addr;  // ignored, but must not be NULL
     struct __gpu_characteristics gc;     // out
+
     __out struct gpu_characteristics gc;
 
   };
 
   };
   Line 792: Line 792:     
   struct {
 
   struct {
     u32 __flush;          // in (l2_flush | l2_invalidate << 1 | fb_flush << 2)
+
     __in u32 flush;          // l2_flush | l2_invalidate << 1 | fb_flush << 2
     u32 __reserved;       // in
+
     u32     reserved;
 
   };
 
   };
   Line 800: Line 800:     
   struct {
 
   struct {
     u32 __mask;        // out (always 0x07)
+
     __out u32 mask;        // always 0x07
     u32 __flush;      // out (active flush bit field)
+
     __out u32 flush;      // active flush bit field
 
   };
 
   };
   Line 891: Line 891:     
   struct {
 
   struct {
     u32 __nvmap_fd;     // in
+
     __in u32 nvmap_fd;
 
   };
 
   };
   Line 898: Line 898:     
   struct {
 
   struct {
     u32 __num_entries;     // in
+
     __in u32 num_entries;
     u32 __flags;           // in
+
     __in u32 flags;
 
   };
 
   };
   Line 906: Line 906:     
   struct fence {
 
   struct fence {
     u32 __id;
+
     u32 id;
     u32 __value;
+
     u32 value;
 
   };
 
   };
 
    
 
    
 
   struct gpfifo_entry {
 
   struct gpfifo_entry {
     u32 __entry0;
+
     u32 entry0;
     u32 __entry1;
+
     u32 entry1;
 
   };
 
   };
 
    
 
    
 
   struct {
 
   struct {
     u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)
+
     __in u64 gpfifo;                     // (ignored) pointer to gpfifo fence structs
     u32 __num_entries;               // in (number of fence objects being submitted)
+
     __in u32 num_entries;                 // number of fence objects being submitted
     u32 __flags;                     // in
+
     __in u32 flags;
     struct fence       __fence_out; // out (returned new fence object for others to wait on)
+
     __out struct fence fence_out;         // returned new fence object for others to wait on
     struct gpfifo_entry __entries[];  // in (depends on __num_entries)
+
     __in  struct gpfifo_entry entries[];  // depends on num_entries
 
   };
 
   };
   Line 927: Line 927:     
   struct {
 
   struct {
     u32 __class_num;    // in (0x902D=2d, 0xB197=3d, 0xB1C0=compute, 0xA140=kepler, 0xB0B5=DMA, 0xB06F=channel_gpfifo)
+
     __in  u32 class_num;    // 0x902D=2d, 0xB197=3d, 0xB1C0=compute, 0xA140=kepler, 0xB0B5=DMA, 0xB06F=channel_gpfifo
     u32 __flags;       // in
+
     __in  u32 flags;
     u64 __obj_id;      // out (ignored; used for FREE_OBJ_CTX ioctl, which is not supported)
+
     __out u64 obj_id;      // (ignored) used for FREE_OBJ_CTX ioctl, which is not supported
 
   };
 
   };
   Line 936: Line 936:     
   struct {
 
   struct {
     u64 __offset;   // in
+
     __in u64 offset;
     u64 __size;     // in
+
     __in u64 size;
     u32 __mem;      // in (nvmap object handle)
+
     __in u32 mem;      // nvmap object handle
     u32 __padding;   // in
+
     __in u32 padding;
 
   };
 
   };
   Line 946: Line 946:     
   struct {
 
   struct {
     u32 __priority;    // in (0x32 is low, 0x64 is medium and 0x96 is high)
+
     __in u32 priority;    // 0x32 is low, 0x64 is medium and 0x96 is high
 
   };
 
   };
   Line 965: Line 965:     
   struct {
 
   struct {
     u32 __cmd;    // in (0=disable, 1=enable, 2=clear)
+
     __in u32 cmd;    // 0=disable, 1=enable, 2=clear
     u32 __unk;    // in (accepts 1 or 2)
+
     __in u32 unk;    // accepts 1 or 2
 
   };
 
   };
   Line 973: Line 973:     
   struct {
 
   struct {
     u64 __timestamp;    // out (nanoseconds since Jan. 1, 1970)
+
     __out  u64 timestamp;    // nanoseconds since Jan. 1, 1970
     u32 __info32;      // out (error code)
+
     __out  u32 info32;      // error code
     u16 __info16;      // out (additional error info)
+
     __out  u16 info16;      // additional error info
     u16 __status;      // inout (always 0xFFFF)
+
     __inout u16 status;      // always 0xFFFF
 
   };
 
   };
   Line 983: Line 983:     
   struct {
 
   struct {
     u32 __num_entries;     // in
+
     __in u32 num_entries;
     u32 __flags;           // in
+
     __in u32 flags;
     u32 __unk0;            // in (1 works)
+
     __in u32 unk0;            // 1 works
     u32 __unk1;           // in
+
     __in u32 unk1;
     u32 __unk2;           // in
+
     __in u32 unk2;
     u32 __unk3;           // in
+
     __in u32 unk3;
     u32 __unk4;           // in
+
     __in u32 unk4;
     u32 __unk5;           // in
+
     __in u32 unk5;
 
   };
 
   };
  

Navigation menu