gem5  v20.1.0.0
kfd_ioctl.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef KFD_IOCTL_H_INCLUDED
24 #define KFD_IOCTL_H_INCLUDED
25 
26 #include <linux/types.h>
27 #include <linux/ioctl.h>
28 
29 #define KFD_IOCTL_MAJOR_VERSION 1
30 #define KFD_IOCTL_MINOR_VERSION 2
31 
33  uint32_t major_version; /* from KFD */
34  uint32_t minor_version; /* from KFD */
35 };
36 
37 /* For kfd_ioctl_create_queue_args.queue_type. */
38 #define KFD_IOC_QUEUE_TYPE_COMPUTE 0
39 #define KFD_IOC_QUEUE_TYPE_SDMA 1
40 #define KFD_IOC_QUEUE_TYPE_COMPUTE_AQL 2
41 
42 #define KFD_MAX_QUEUE_PERCENTAGE 100
43 #define KFD_MAX_QUEUE_PRIORITY 15
44 
46  uint64_t ring_base_address; /* to KFD */
47  uint64_t write_pointer_address; /* from KFD */
48  uint64_t read_pointer_address; /* from KFD */
49  uint64_t doorbell_offset; /* from KFD */
50 
51  uint32_t ring_size; /* to KFD */
52  uint32_t gpu_id; /* to KFD */
53  uint32_t queue_type; /* to KFD */
54  uint32_t queue_percentage; /* to KFD */
55  uint32_t queue_priority; /* to KFD */
56  uint32_t queue_id; /* from KFD */
57 
58  uint64_t eop_buffer_address; /* to KFD */
59  uint64_t eop_buffer_size; /* to KFD */
60  uint64_t ctx_save_restore_address; /* to KFD */
61  uint32_t ctx_save_restore_size; /* to KFD */
62  uint32_t ctl_stack_size; /* to KFD */
63 };
64 
66  uint32_t queue_id; /* to KFD */
67  uint32_t pad;
68 };
69 
71  uint64_t ring_base_address; /* to KFD */
72 
73  uint32_t queue_id; /* to KFD */
74  uint32_t ring_size; /* to KFD */
75  uint32_t queue_percentage; /* to KFD */
76  uint32_t queue_priority; /* to KFD */
77 };
78 
80  uint32_t queue_id; /* to KFD */
81  uint32_t num_cu_mask; /* to KFD */
82  uint64_t cu_mask_ptr; /* to KFD */
83 };
84 
85 /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
86 #define KFD_IOC_CACHE_POLICY_COHERENT 0
87 #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
88 
90  uint64_t alternate_aperture_base; /* to KFD */
91  uint64_t alternate_aperture_size; /* to KFD */
92 
93  uint32_t gpu_id; /* to KFD */
94  uint32_t default_policy; /* to KFD */
95  uint32_t alternate_policy; /* to KFD */
96  uint32_t pad;
97 };
98 
100  uint64_t tba_addr;
101  uint64_t tma_addr;
102  uint32_t gpu_id; /* to KFD */
103  uint32_t pad;
104 };
105 
106 /*
107  * All counters are monotonic. They are used for profiling of compute jobs.
108  * The profiling is done by userspace.
109  *
110  * In case of GPU reset, the counter should not be affected.
111  */
112 
114  uint64_t gpu_clock_counter; /* from KFD */
115  uint64_t cpu_clock_counter; /* from KFD */
116  uint64_t system_clock_counter; /* from KFD */
117  uint64_t system_clock_freq; /* from KFD */
118 
119  uint32_t gpu_id; /* to KFD */
120  uint32_t pad;
121 };
122 
123 #define NUM_OF_SUPPORTED_GPUS 7
124 
126  uint64_t lds_base; /* from KFD */
127  uint64_t lds_limit; /* from KFD */
128  uint64_t scratch_base; /* from KFD */
129  uint64_t scratch_limit; /* from KFD */
130  uint64_t gpuvm_base; /* from KFD */
131  uint64_t gpuvm_limit; /* from KFD */
132  uint32_t gpu_id; /* from KFD */
133  uint32_t pad;
134 };
135 
136 /* This IOCTL and the limited NUM_OF_SUPPORTED_GPUS is deprecated. Use
137  * kfd_ioctl_get_process_apertures_new instead, which supports
138  * arbitrary numbers of GPUs.
139  */
143 
144  /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */
145  uint32_t num_of_nodes;
146  uint32_t pad;
147 };
148 
150  /* User allocated. Pointer to struct kfd_process_device_apertures
151  * filled in by Kernel
152  */
154  /* to KFD - indicates amount of memory present in
155  * kfd_process_device_apertures_ptr
156  * from KFD - Number of entries filled by KFD.
157  */
158  uint32_t num_of_nodes;
159  uint32_t pad;
160 };
161 
162 #define MAX_ALLOWED_NUM_POINTS 100
163 #define MAX_ALLOWED_AW_BUFF_SIZE 4096
164 #define MAX_ALLOWED_WAC_BUFF_SIZE 128
165 
167  uint32_t gpu_id; /* to KFD */
168  uint32_t pad;
169 };
170 
172  uint32_t gpu_id; /* to KFD */
173  uint32_t pad;
174 };
175 
177  uint64_t content_ptr; /* a pointer to the actual content */
178  uint32_t gpu_id; /* to KFD */
179  uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
180 };
181 
183  uint64_t content_ptr; /* a pointer to the actual content */
184  uint32_t gpu_id; /* to KFD */
185  uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
186 };
187 
188 /* Matching HSA_EVENTTYPE */
189 #define KFD_IOC_EVENT_SIGNAL 0
190 #define KFD_IOC_EVENT_NODECHANGE 1
191 #define KFD_IOC_EVENT_DEVICESTATECHANGE 2
192 #define KFD_IOC_EVENT_HW_EXCEPTION 3
193 #define KFD_IOC_EVENT_SYSTEM_EVENT 4
194 #define KFD_IOC_EVENT_DEBUG_EVENT 5
195 #define KFD_IOC_EVENT_PROFILE_EVENT 6
196 #define KFD_IOC_EVENT_QUEUE_EVENT 7
197 #define KFD_IOC_EVENT_MEMORY 8
198 
199 #define KFD_IOC_WAIT_RESULT_COMPLETE 0
200 #define KFD_IOC_WAIT_RESULT_TIMEOUT 1
201 #define KFD_IOC_WAIT_RESULT_FAIL 2
202 
203 /*
204  * The added 512 is because, currently, 8*(4096/256) signal events are
205  * reserved for debugger events, and we want to provide at least 4K signal
206  * events for EOP usage.
207  * We add 512 to make the allocated size (KFD_SIGNAL_EVENT_LIMIT * 8) be
208  * page aligned.
209  */
210 #define KFD_SIGNAL_EVENT_LIMIT (4096 + 512)
211 
213  uint64_t event_page_offset; /* from KFD */
214  uint32_t event_trigger_data; /* from KFD - signal events only */
215  uint32_t event_type; /* to KFD */
216  uint32_t auto_reset; /* to KFD */
217  uint32_t node_id; /* to KFD - only valid for certain
218  event types */
219  uint32_t event_id; /* from KFD */
220  uint32_t event_slot_index; /* from KFD */
221 };
222 
224  uint32_t event_id; /* to KFD */
225  uint32_t pad;
226 };
227 
229  uint32_t event_id; /* to KFD */
230  uint32_t pad;
231 };
232 
234  uint32_t event_id; /* to KFD */
235  uint32_t pad;
236 };
237 
239  uint32_t NotPresent; /* Page not present or supervisor privilege */
240  uint32_t ReadOnly; /* Write access to a read-only page */
241  uint32_t NoExecute; /* Execute access to a page marked NX */
242  uint32_t imprecise; /* Can't determine the exact fault address */
243 };
244 
245 /* memory exception data */
248  uint64_t va;
249  uint32_t gpu_id;
250  uint32_t pad;
251 };
252 
253 /* Event data */
255  union {
257  }; /* From KFD */
258  uint64_t kfd_event_data_ext; /* pointer to an extension structure
259  for future exception types */
260  uint32_t event_id; /* to KFD */
261  uint32_t pad;
262 };
263 
265  uint64_t events_ptr; /* pointed to struct
266  kfd_event_data array, to KFD */
267  uint32_t num_events; /* to KFD */
268  uint32_t wait_for_all; /* to KFD */
269  uint32_t timeout; /* to KFD */
270  uint32_t wait_result; /* from KFD */
271 };
272 
274  uint64_t va_addr; /* to KFD */
275  uint64_t size; /* to KFD */
276  uint32_t gpu_id; /* to KFD */
277  uint32_t pad;
278 };
279 
280 /* Allocation flags: memory types */
281 #define KFD_IOC_ALLOC_MEM_FLAGS_VRAM (1 << 0)
282 #define KFD_IOC_ALLOC_MEM_FLAGS_GTT (1 << 1)
283 #define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)
284 #define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)
285 /* Allocation flags: attributes/access options */
286 #define KFD_IOC_ALLOC_MEM_FLAGS_NONPAGED (1 << 31)
287 #define KFD_IOC_ALLOC_MEM_FLAGS_READONLY (1 << 30)
288 #define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)
289 #define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
290 #define KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM (1 << 27)
291 #define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTE_ACCESS (1 << 26)
292 #define KFD_IOC_ALLOC_MEM_FLAGS_COHERENT (1 << 25)
293 
295  uint64_t va_addr; /* to KFD */
296  uint64_t size; /* to KFD */
297  uint64_t handle; /* from KFD */
298  uint64_t mmap_offset; /* to KFD (userptr), from KFD (mmap offset) */
299  uint32_t gpu_id; /* to KFD */
300  uint32_t flags;
301 };
302 
304  uint64_t handle; /* to KFD */
305 };
306 
308  uint64_t handle; /* to KFD */
309  uint64_t device_ids_array_ptr; /* to KFD */
310  uint32_t device_ids_array_size; /* to KFD */
311  uint32_t pad;
312 };
313 
315  uint64_t handle; /* to KFD */
316  uint64_t device_ids_array_ptr; /* to KFD */
317  uint32_t device_ids_array_size; /* to KFD */
318  uint32_t pad;
319 };
320 
321 /* TODO: remove this. It's only implemented for Kaveri and was never
322  * upstreamed. There are no open-source users of this interface. It
323  * has been superseded by the pair of get_dmabuf_info and
324  * import_dmabuf, which is implemented for all supported GPUs.
325  */
327  uint64_t va_addr; /* to KFD */
328  uint64_t handle; /* from KFD */
329  uint32_t gpu_id; /* to KFD */
330  int graphic_device_fd; /* to KFD */
331  uint32_t graphic_handle; /* to KFD */
332  uint32_t pad;
333 };
334 
336  uint64_t dgpu_base;
337  uint64_t dgpu_limit;
338  uint32_t gpu_id;
339  uint32_t pad;
340 };
341 
343  uint64_t size; /* from KFD */
344  uint64_t metadata_ptr; /* to KFD */
345  uint32_t metadata_size; /* to KFD (space allocated by user)
346  * from KFD (actual metadata size) */
347  uint32_t gpu_id; /* from KFD */
348  uint32_t flags; /* from KFD (KFD_IOC_ALLOC_MEM_FLAGS) */
349  uint32_t dmabuf_fd; /* to KFD */
350 };
351 
353  uint64_t va_addr; /* to KFD */
354  uint64_t handle; /* from KFD */
355  uint32_t gpu_id; /* to KFD */
356  uint32_t dmabuf_fd; /* to KFD */
357 };
358 
360  uint64_t handle; /* to KFD */
361  uint32_t share_handle[4]; /* from KFD */
362  uint32_t gpu_id; /* to KFD */
363  uint32_t pad;
364 };
365 
367  uint64_t handle; /* from KFD */
368  uint64_t va_addr; /* to KFD */
369  uint64_t mmap_offset; /* from KFD */
370  uint32_t share_handle[4]; /* to KFD */
371  uint32_t gpu_id; /* to KFD */
372  uint32_t pad;
373 };
374 
376  /* to KFD: pointer to tile array */
377  uint64_t tile_config_ptr;
378  /* to KFD: pointer to macro tile array */
380  /* to KFD: array size allocated by user mode
381  * from KFD: array size filled by kernel
382  */
384  /* to KFD: array size allocated by user mode
385  * from KFD: array size filled by kernel
386  */
388 
389  uint32_t gpu_id; /* to KFD */
390  uint32_t gb_addr_config; /* from KFD */
391  uint32_t num_banks; /* from KFD */
392  uint32_t num_ranks; /* from KFD */
393  /* struct size can be extended later if needed
394  * without breaking ABI compatibility
395  */
396 };
397 
399  uint64_t va_addr;
400  uint64_t size;
401 };
402 
403 /* flags definitions
404  * BIT0: 0: read operation, 1: write operation.
405  * This also identifies if the src or dst array belongs to remote process
406  */
407 #define KFD_CROSS_MEMORY_RW_BIT (1 << 0)
408 #define KFD_SET_CROSS_MEMORY_READ(flags) (flags &= ~KFD_CROSS_MEMORY_RW_BIT)
409 #define KFD_SET_CROSS_MEMORY_WRITE(flags) (flags |= KFD_CROSS_MEMORY_RW_BIT)
410 #define KFD_IS_CROSS_MEMORY_WRITE(flags) (flags & KFD_CROSS_MEMORY_RW_BIT)
411 
413  /* to KFD: Process ID of the remote process */
414  uint32_t pid;
415  /* to KFD: See above definition */
416  uint32_t flags;
417  /* to KFD: Source GPU VM range */
419  /* to KFD: Size of above array */
421  /* to KFD: Destination GPU VM range */
423  /* to KFD: Size of above array */
425  /* from KFD: Total amount of bytes copied */
426  uint64_t bytes_copied;
427 };
428 
429 #define AMDKFD_IOCTL_BASE 'K'
430 #define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
431 #define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
432 #define AMDKFD_IOW(nr, type) _IOW(AMDKFD_IOCTL_BASE, nr, type)
433 #define AMDKFD_IOWR(nr, type) _IOWR(AMDKFD_IOCTL_BASE, nr, type)
434 
435 #define AMDKFD_IOC_GET_VERSION \
436  AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args)
437 
438 #define AMDKFD_IOC_CREATE_QUEUE \
439  AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args)
440 
441 #define AMDKFD_IOC_DESTROY_QUEUE \
442  AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args)
443 
444 #define AMDKFD_IOC_SET_MEMORY_POLICY \
445  AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args)
446 
447 #define AMDKFD_IOC_GET_CLOCK_COUNTERS \
448  AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args)
449 
450 #define AMDKFD_IOC_GET_PROCESS_APERTURES \
451  AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args)
452 
453 #define AMDKFD_IOC_UPDATE_QUEUE \
454  AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args)
455 
456 #define AMDKFD_IOC_CREATE_EVENT \
457  AMDKFD_IOWR(0x08, struct kfd_ioctl_create_event_args)
458 
459 #define AMDKFD_IOC_DESTROY_EVENT \
460  AMDKFD_IOW(0x09, struct kfd_ioctl_destroy_event_args)
461 
462 #define AMDKFD_IOC_SET_EVENT \
463  AMDKFD_IOW(0x0A, struct kfd_ioctl_set_event_args)
464 
465 #define AMDKFD_IOC_RESET_EVENT \
466  AMDKFD_IOW(0x0B, struct kfd_ioctl_reset_event_args)
467 
468 #define AMDKFD_IOC_WAIT_EVENTS \
469  AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args)
470 
471 #define AMDKFD_IOC_DBG_REGISTER \
472  AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args)
473 
474 #define AMDKFD_IOC_DBG_UNREGISTER \
475  AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args)
476 
477 #define AMDKFD_IOC_DBG_ADDRESS_WATCH \
478  AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args)
479 
480 #define AMDKFD_IOC_DBG_WAVE_CONTROL \
481  AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args)
482 
483 #define AMDKFD_IOC_ALLOC_MEMORY_OF_GPU \
484  AMDKFD_IOWR(0x11, struct kfd_ioctl_alloc_memory_of_gpu_args)
485 
486 #define AMDKFD_IOC_FREE_MEMORY_OF_GPU \
487  AMDKFD_IOWR(0x12, struct kfd_ioctl_free_memory_of_gpu_args)
488 
489 #define AMDKFD_IOC_MAP_MEMORY_TO_GPU \
490  AMDKFD_IOWR(0x13, struct kfd_ioctl_map_memory_to_gpu_args)
491 
492 #define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU \
493  AMDKFD_IOWR(0x14, struct kfd_ioctl_unmap_memory_from_gpu_args)
494 
495 #define AMDKFD_IOC_ALLOC_MEMORY_OF_SCRATCH \
496  AMDKFD_IOWR(0x15, struct kfd_ioctl_alloc_memory_of_scratch_args)
497 
498 #define AMDKFD_IOC_SET_CU_MASK \
499  AMDKFD_IOW(0x16, struct kfd_ioctl_set_cu_mask_args)
500 
501 #define AMDKFD_IOC_SET_PROCESS_DGPU_APERTURE \
502  AMDKFD_IOW(0x17, \
503  struct kfd_ioctl_set_process_dgpu_aperture_args)
504 
505 #define AMDKFD_IOC_SET_TRAP_HANDLER \
506  AMDKFD_IOW(0x18, struct kfd_ioctl_set_trap_handler_args)
507 
508 #define AMDKFD_IOC_GET_PROCESS_APERTURES_NEW \
509  AMDKFD_IOWR(0x19, struct kfd_ioctl_get_process_apertures_new_args)
510 
511 #define AMDKFD_IOC_GET_DMABUF_INFO \
512  AMDKFD_IOWR(0x1A, struct kfd_ioctl_get_dmabuf_info_args)
513 
514 #define AMDKFD_IOC_IMPORT_DMABUF \
515  AMDKFD_IOWR(0x1B, struct kfd_ioctl_import_dmabuf_args)
516 
517 #define AMDKFD_IOC_GET_TILE_CONFIG \
518  AMDKFD_IOWR(0x1C, struct kfd_ioctl_get_tile_config_args)
519 
520 #define AMDKFD_IOC_IPC_IMPORT_HANDLE \
521  AMDKFD_IOWR(0x1D, struct kfd_ioctl_ipc_import_handle_args)
522 
523 #define AMDKFD_IOC_IPC_EXPORT_HANDLE \
524  AMDKFD_IOWR(0x1E, struct kfd_ioctl_ipc_export_handle_args)
525 
526 #define AMDKFD_IOC_CROSS_MEMORY_COPY \
527  AMDKFD_IOWR(0x1F, struct kfd_ioctl_cross_memory_copy_args)
528 
529 /* TODO: remove this */
530 #define AMDKFD_IOC_OPEN_GRAPHIC_HANDLE \
531  AMDKFD_IOWR(0x20, struct kfd_ioctl_open_graphic_handle_args)
532 
533 #define AMDKFD_COMMAND_START 0x01
534 #define AMDKFD_COMMAND_END 0x21
535 
536 #endif
kfd_ioctl_get_version_args::minor_version
uint32_t minor_version
Definition: kfd_ioctl.h:34
kfd_ioctl_import_dmabuf_args
Definition: kfd_ioctl.h:352
kfd_ioctl_get_dmabuf_info_args::dmabuf_fd
uint32_t dmabuf_fd
Definition: kfd_ioctl.h:349
kfd_ioctl_set_memory_policy_args::alternate_policy
uint32_t alternate_policy
Definition: kfd_ioctl.h:95
kfd_ioctl_set_trap_handler_args::tma_addr
uint64_t tma_addr
Definition: kfd_ioctl.h:101
kfd_event_data::memory_exception_data
struct kfd_hsa_memory_exception_data memory_exception_data
Definition: kfd_ioctl.h:256
kfd_ioctl_free_memory_of_gpu_args::handle
uint64_t handle
Definition: kfd_ioctl.h:304
kfd_ioctl_set_process_dgpu_aperture_args
Definition: kfd_ioctl.h:335
kfd_ioctl_get_tile_config_args::num_macro_tile_configs
uint32_t num_macro_tile_configs
Definition: kfd_ioctl.h:387
kfd_hsa_memory_exception_data::va
uint64_t va
Definition: kfd_ioctl.h:248
kfd_ioctl_set_trap_handler_args::tba_addr
uint64_t tba_addr
Definition: kfd_ioctl.h:100
kfd_ioctl_alloc_memory_of_scratch_args::size
uint64_t size
Definition: kfd_ioctl.h:275
kfd_ioctl_dbg_unregister_args
Definition: kfd_ioctl.h:171
kfd_ioctl_dbg_register_args
Definition: kfd_ioctl.h:166
kfd_memory_range::size
uint64_t size
Definition: kfd_ioctl.h:400
kfd_ioctl_update_queue_args::queue_priority
uint32_t queue_priority
Definition: kfd_ioctl.h:76
kfd_ioctl_dbg_wave_control_args::content_ptr
uint64_t content_ptr
Definition: kfd_ioctl.h:183
kfd_ioctl_set_cu_mask_args::queue_id
uint32_t queue_id
Definition: kfd_ioctl.h:80
kfd_ioctl_ipc_export_handle_args::pad
uint32_t pad
Definition: kfd_ioctl.h:363
kfd_ioctl_set_memory_policy_args
Definition: kfd_ioctl.h:89
kfd_ioctl_dbg_address_watch_args::content_ptr
uint64_t content_ptr
Definition: kfd_ioctl.h:177
kfd_ioctl_get_process_apertures_new_args::kfd_process_device_apertures_ptr
uint64_t kfd_process_device_apertures_ptr
Definition: kfd_ioctl.h:153
kfd_ioctl_create_queue_args::read_pointer_address
uint64_t read_pointer_address
Definition: kfd_ioctl.h:48
kfd_ioctl_update_queue_args
Definition: kfd_ioctl.h:70
kfd_ioctl_dbg_address_watch_args::buf_size_in_bytes
uint32_t buf_size_in_bytes
Definition: kfd_ioctl.h:179
kfd_ioctl_alloc_memory_of_gpu_args::size
uint64_t size
Definition: kfd_ioctl.h:296
kfd_process_device_apertures::gpuvm_limit
uint64_t gpuvm_limit
Definition: kfd_ioctl.h:131
kfd_ioctl_get_tile_config_args::num_tile_configs
uint32_t num_tile_configs
Definition: kfd_ioctl.h:383
kfd_ioctl_cross_memory_copy_args::pid
uint32_t pid
Definition: kfd_ioctl.h:414
kfd_hsa_memory_exception_data::failure
struct kfd_memory_exception_failure failure
Definition: kfd_ioctl.h:247
kfd_memory_range::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:399
kfd_ioctl_dbg_unregister_args::pad
uint32_t pad
Definition: kfd_ioctl.h:173
kfd_ioctl_ipc_import_handle_args
Definition: kfd_ioctl.h:366
kfd_process_device_apertures::lds_base
uint64_t lds_base
Definition: kfd_ioctl.h:126
kfd_ioctl_map_memory_to_gpu_args::handle
uint64_t handle
Definition: kfd_ioctl.h:308
kfd_ioctl_destroy_queue_args
Definition: kfd_ioctl.h:65
kfd_ioctl_create_event_args::event_page_offset
uint64_t event_page_offset
Definition: kfd_ioctl.h:213
kfd_ioctl_dbg_address_watch_args
Definition: kfd_ioctl.h:176
kfd_ioctl_cross_memory_copy_args::dst_mem_range_array
uint64_t dst_mem_range_array
Definition: kfd_ioctl.h:422
kfd_ioctl_alloc_memory_of_scratch_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:276
kfd_ioctl_create_queue_args::ctx_save_restore_address
uint64_t ctx_save_restore_address
Definition: kfd_ioctl.h:60
kfd_ioctl_alloc_memory_of_gpu_args::flags
uint32_t flags
Definition: kfd_ioctl.h:300
kfd_ioctl_get_dmabuf_info_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:347
kfd_ioctl_get_clock_counters_args::system_clock_counter
uint64_t system_clock_counter
Definition: kfd_ioctl.h:116
kfd_ioctl_alloc_memory_of_gpu_args
Definition: kfd_ioctl.h:294
kfd_ioctl_set_memory_policy_args::alternate_aperture_base
uint64_t alternate_aperture_base
Definition: kfd_ioctl.h:90
kfd_ioctl_reset_event_args::pad
uint32_t pad
Definition: kfd_ioctl.h:235
kfd_memory_exception_failure::imprecise
uint32_t imprecise
Definition: kfd_ioctl.h:242
kfd_ioctl_open_graphic_handle_args::graphic_handle
uint32_t graphic_handle
Definition: kfd_ioctl.h:331
kfd_ioctl_create_queue_args::ctx_save_restore_size
uint32_t ctx_save_restore_size
Definition: kfd_ioctl.h:61
kfd_ioctl_map_memory_to_gpu_args::pad
uint32_t pad
Definition: kfd_ioctl.h:311
kfd_ioctl_get_process_apertures_args::process_apertures
struct kfd_process_device_apertures process_apertures[NUM_OF_SUPPORTED_GPUS]
Definition: kfd_ioctl.h:141
kfd_ioctl_cross_memory_copy_args::src_mem_range_array
uint64_t src_mem_range_array
Definition: kfd_ioctl.h:418
kfd_process_device_apertures::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:132
kfd_memory_exception_failure::NotPresent
uint32_t NotPresent
Definition: kfd_ioctl.h:239
kfd_ioctl_create_queue_args::eop_buffer_size
uint64_t eop_buffer_size
Definition: kfd_ioctl.h:59
kfd_memory_range
Definition: kfd_ioctl.h:398
kfd_ioctl_ipc_import_handle_args::share_handle
uint32_t share_handle[4]
Definition: kfd_ioctl.h:370
kfd_ioctl_import_dmabuf_args::handle
uint64_t handle
Definition: kfd_ioctl.h:354
kfd_ioctl_get_clock_counters_args::pad
uint32_t pad
Definition: kfd_ioctl.h:120
kfd_ioctl_dbg_register_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:167
kfd_ioctl_create_event_args::event_type
uint32_t event_type
Definition: kfd_ioctl.h:215
kfd_memory_exception_failure
Definition: kfd_ioctl.h:238
kfd_ioctl_get_clock_counters_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:119
kfd_ioctl_destroy_event_args
Definition: kfd_ioctl.h:223
kfd_ioctl_wait_events_args::events_ptr
uint64_t events_ptr
Definition: kfd_ioctl.h:265
kfd_ioctl_unmap_memory_from_gpu_args::device_ids_array_size
uint32_t device_ids_array_size
Definition: kfd_ioctl.h:317
kfd_ioctl_get_process_apertures_args
Definition: kfd_ioctl.h:140
kfd_ioctl_ipc_import_handle_args::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:368
kfd_ioctl_get_tile_config_args::num_banks
uint32_t num_banks
Definition: kfd_ioctl.h:391
kfd_ioctl_get_dmabuf_info_args::flags
uint32_t flags
Definition: kfd_ioctl.h:348
kfd_ioctl_set_trap_handler_args
Definition: kfd_ioctl.h:99
kfd_ioctl_get_tile_config_args
Definition: kfd_ioctl.h:375
kfd_ioctl_dbg_address_watch_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:178
kfd_ioctl_get_clock_counters_args::system_clock_freq
uint64_t system_clock_freq
Definition: kfd_ioctl.h:117
kfd_ioctl_open_graphic_handle_args::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:327
kfd_ioctl_get_clock_counters_args::gpu_clock_counter
uint64_t gpu_clock_counter
Definition: kfd_ioctl.h:114
kfd_ioctl_get_clock_counters_args::cpu_clock_counter
uint64_t cpu_clock_counter
Definition: kfd_ioctl.h:115
kfd_ioctl_create_event_args::event_trigger_data
uint32_t event_trigger_data
Definition: kfd_ioctl.h:214
kfd_ioctl_set_event_args
Definition: kfd_ioctl.h:228
kfd_ioctl_alloc_memory_of_gpu_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:299
kfd_ioctl_alloc_memory_of_scratch_args
Definition: kfd_ioctl.h:273
kfd_ioctl_alloc_memory_of_gpu_args::handle
uint64_t handle
Definition: kfd_ioctl.h:297
kfd_memory_exception_failure::NoExecute
uint32_t NoExecute
Definition: kfd_ioctl.h:241
kfd_ioctl_open_graphic_handle_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:329
kfd_ioctl_create_queue_args::doorbell_offset
uint64_t doorbell_offset
Definition: kfd_ioctl.h:49
kfd_ioctl_create_queue_args::ring_base_address
uint64_t ring_base_address
Definition: kfd_ioctl.h:46
kfd_ioctl_wait_events_args::timeout
uint32_t timeout
Definition: kfd_ioctl.h:269
kfd_ioctl_get_process_apertures_args::num_of_nodes
uint32_t num_of_nodes
Definition: kfd_ioctl.h:145
kfd_ioctl_create_queue_args
Definition: kfd_ioctl.h:45
kfd_ioctl_create_queue_args::queue_id
uint32_t queue_id
Definition: kfd_ioctl.h:56
kfd_ioctl_dbg_unregister_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:172
kfd_ioctl_set_memory_policy_args::pad
uint32_t pad
Definition: kfd_ioctl.h:96
kfd_ioctl_dbg_wave_control_args::buf_size_in_bytes
uint32_t buf_size_in_bytes
Definition: kfd_ioctl.h:185
kfd_ioctl_alloc_memory_of_scratch_args::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:274
kfd_ioctl_set_trap_handler_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:102
kfd_ioctl_open_graphic_handle_args::graphic_device_fd
int graphic_device_fd
Definition: kfd_ioctl.h:330
kfd_ioctl_import_dmabuf_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:355
kfd_ioctl_get_tile_config_args::macro_tile_config_ptr
uint64_t macro_tile_config_ptr
Definition: kfd_ioctl.h:379
kfd_ioctl_import_dmabuf_args::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:353
kfd_ioctl_get_dmabuf_info_args::metadata_ptr
uint64_t metadata_ptr
Definition: kfd_ioctl.h:344
kfd_ioctl_set_cu_mask_args::cu_mask_ptr
uint64_t cu_mask_ptr
Definition: kfd_ioctl.h:82
kfd_ioctl_get_tile_config_args::tile_config_ptr
uint64_t tile_config_ptr
Definition: kfd_ioctl.h:377
kfd_hsa_memory_exception_data
Definition: kfd_ioctl.h:246
kfd_process_device_apertures::gpuvm_base
uint64_t gpuvm_base
Definition: kfd_ioctl.h:130
kfd_ioctl_open_graphic_handle_args
Definition: kfd_ioctl.h:326
kfd_ioctl_unmap_memory_from_gpu_args::handle
uint64_t handle
Definition: kfd_ioctl.h:315
kfd_ioctl_get_tile_config_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:389
kfd_ioctl_wait_events_args
Definition: kfd_ioctl.h:264
kfd_ioctl_set_memory_policy_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:93
kfd_ioctl_get_dmabuf_info_args::metadata_size
uint32_t metadata_size
Definition: kfd_ioctl.h:345
kfd_hsa_memory_exception_data::pad
uint32_t pad
Definition: kfd_ioctl.h:250
kfd_ioctl_cross_memory_copy_args::flags
uint32_t flags
Definition: kfd_ioctl.h:416
kfd_ioctl_create_queue_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:52
kfd_ioctl_ipc_export_handle_args::handle
uint64_t handle
Definition: kfd_ioctl.h:360
kfd_ioctl_update_queue_args::queue_percentage
uint32_t queue_percentage
Definition: kfd_ioctl.h:75
kfd_event_data::pad
uint32_t pad
Definition: kfd_ioctl.h:261
kfd_ioctl_create_queue_args::eop_buffer_address
uint64_t eop_buffer_address
Definition: kfd_ioctl.h:58
kfd_event_data
Definition: kfd_ioctl.h:254
kfd_ioctl_get_tile_config_args::num_ranks
uint32_t num_ranks
Definition: kfd_ioctl.h:392
kfd_process_device_apertures::scratch_limit
uint64_t scratch_limit
Definition: kfd_ioctl.h:129
kfd_ioctl_create_queue_args::queue_type
uint32_t queue_type
Definition: kfd_ioctl.h:53
kfd_process_device_apertures
Definition: kfd_ioctl.h:125
kfd_ioctl_dbg_wave_control_args
Definition: kfd_ioctl.h:182
kfd_ioctl_ipc_import_handle_args::mmap_offset
uint64_t mmap_offset
Definition: kfd_ioctl.h:369
kfd_ioctl_set_event_args::event_id
uint32_t event_id
Definition: kfd_ioctl.h:229
kfd_ioctl_update_queue_args::ring_base_address
uint64_t ring_base_address
Definition: kfd_ioctl.h:71
kfd_ioctl_get_version_args::major_version
uint32_t major_version
Definition: kfd_ioctl.h:33
kfd_process_device_apertures::pad
uint32_t pad
Definition: kfd_ioctl.h:133
kfd_event_data::event_id
uint32_t event_id
Definition: kfd_ioctl.h:260
kfd_ioctl_cross_memory_copy_args::dst_mem_array_size
uint64_t dst_mem_array_size
Definition: kfd_ioctl.h:424
kfd_ioctl_cross_memory_copy_args
Definition: kfd_ioctl.h:412
kfd_ioctl_map_memory_to_gpu_args::device_ids_array_ptr
uint64_t device_ids_array_ptr
Definition: kfd_ioctl.h:309
kfd_ioctl_update_queue_args::ring_size
uint32_t ring_size
Definition: kfd_ioctl.h:74
kfd_ioctl_get_tile_config_args::gb_addr_config
uint32_t gb_addr_config
Definition: kfd_ioctl.h:390
kfd_ioctl_wait_events_args::wait_result
uint32_t wait_result
Definition: kfd_ioctl.h:270
kfd_ioctl_destroy_queue_args::pad
uint32_t pad
Definition: kfd_ioctl.h:67
kfd_ioctl_create_queue_args::ctl_stack_size
uint32_t ctl_stack_size
Definition: kfd_ioctl.h:62
kfd_ioctl_get_process_apertures_args::pad
uint32_t pad
Definition: kfd_ioctl.h:146
kfd_ioctl_import_dmabuf_args::dmabuf_fd
uint32_t dmabuf_fd
Definition: kfd_ioctl.h:356
kfd_ioctl_map_memory_to_gpu_args
Definition: kfd_ioctl.h:307
kfd_ioctl_set_process_dgpu_aperture_args::dgpu_base
uint64_t dgpu_base
Definition: kfd_ioctl.h:336
kfd_hsa_memory_exception_data::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:249
kfd_ioctl_get_dmabuf_info_args::size
uint64_t size
Definition: kfd_ioctl.h:343
kfd_ioctl_ipc_export_handle_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:362
kfd_ioctl_get_process_apertures_new_args
Definition: kfd_ioctl.h:149
kfd_ioctl_unmap_memory_from_gpu_args::device_ids_array_ptr
uint64_t device_ids_array_ptr
Definition: kfd_ioctl.h:316
kfd_ioctl_reset_event_args::event_id
uint32_t event_id
Definition: kfd_ioctl.h:234
kfd_ioctl_ipc_import_handle_args::handle
uint64_t handle
Definition: kfd_ioctl.h:367
kfd_ioctl_destroy_event_args::event_id
uint32_t event_id
Definition: kfd_ioctl.h:224
kfd_ioctl_ipc_export_handle_args::share_handle
uint32_t share_handle[4]
Definition: kfd_ioctl.h:361
kfd_ioctl_set_cu_mask_args
Definition: kfd_ioctl.h:79
kfd_event_data::kfd_event_data_ext
uint64_t kfd_event_data_ext
Definition: kfd_ioctl.h:258
kfd_ioctl_set_memory_policy_args::default_policy
uint32_t default_policy
Definition: kfd_ioctl.h:94
kfd_ioctl_set_process_dgpu_aperture_args::pad
uint32_t pad
Definition: kfd_ioctl.h:339
kfd_ioctl_get_dmabuf_info_args
Definition: kfd_ioctl.h:342
kfd_ioctl_wait_events_args::wait_for_all
uint32_t wait_for_all
Definition: kfd_ioctl.h:268
kfd_ioctl_create_event_args
Definition: kfd_ioctl.h:212
kfd_ioctl_create_queue_args::queue_priority
uint32_t queue_priority
Definition: kfd_ioctl.h:55
NUM_OF_SUPPORTED_GPUS
#define NUM_OF_SUPPORTED_GPUS
Definition: kfd_ioctl.h:123
kfd_ioctl_ipc_import_handle_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:371
kfd_ioctl_create_queue_args::write_pointer_address
uint64_t write_pointer_address
Definition: kfd_ioctl.h:47
kfd_ioctl_get_process_apertures_new_args::pad
uint32_t pad
Definition: kfd_ioctl.h:159
kfd_ioctl_create_queue_args::ring_size
uint32_t ring_size
Definition: kfd_ioctl.h:51
kfd_ioctl_alloc_memory_of_gpu_args::mmap_offset
uint64_t mmap_offset
Definition: kfd_ioctl.h:298
kfd_ioctl_open_graphic_handle_args::handle
uint64_t handle
Definition: kfd_ioctl.h:328
kfd_ioctl_create_event_args::event_slot_index
uint32_t event_slot_index
Definition: kfd_ioctl.h:220
kfd_ioctl_destroy_event_args::pad
uint32_t pad
Definition: kfd_ioctl.h:225
kfd_ioctl_open_graphic_handle_args::pad
uint32_t pad
Definition: kfd_ioctl.h:332
kfd_ioctl_alloc_memory_of_scratch_args::pad
uint32_t pad
Definition: kfd_ioctl.h:277
kfd_ioctl_get_version_args
Definition: kfd_ioctl.h:32
kfd_ioctl_dbg_wave_control_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:184
kfd_ioctl_set_process_dgpu_aperture_args::gpu_id
uint32_t gpu_id
Definition: kfd_ioctl.h:338
kfd_ioctl_map_memory_to_gpu_args::device_ids_array_size
uint32_t device_ids_array_size
Definition: kfd_ioctl.h:310
kfd_ioctl_cross_memory_copy_args::bytes_copied
uint64_t bytes_copied
Definition: kfd_ioctl.h:426
kfd_ioctl_unmap_memory_from_gpu_args
Definition: kfd_ioctl.h:314
kfd_ioctl_unmap_memory_from_gpu_args::pad
uint32_t pad
Definition: kfd_ioctl.h:318
kfd_ioctl_ipc_import_handle_args::pad
uint32_t pad
Definition: kfd_ioctl.h:372
kfd_ioctl_reset_event_args
Definition: kfd_ioctl.h:233
kfd_process_device_apertures::scratch_base
uint64_t scratch_base
Definition: kfd_ioctl.h:128
kfd_ioctl_dbg_register_args::pad
uint32_t pad
Definition: kfd_ioctl.h:168
kfd_ioctl_set_cu_mask_args::num_cu_mask
uint32_t num_cu_mask
Definition: kfd_ioctl.h:81
kfd_ioctl_set_memory_policy_args::alternate_aperture_size
uint64_t alternate_aperture_size
Definition: kfd_ioctl.h:91
kfd_memory_exception_failure::ReadOnly
uint32_t ReadOnly
Definition: kfd_ioctl.h:240
kfd_ioctl_update_queue_args::queue_id
uint32_t queue_id
Definition: kfd_ioctl.h:73
kfd_ioctl_set_process_dgpu_aperture_args::dgpu_limit
uint64_t dgpu_limit
Definition: kfd_ioctl.h:337
kfd_ioctl_cross_memory_copy_args::src_mem_array_size
uint64_t src_mem_array_size
Definition: kfd_ioctl.h:420
kfd_ioctl_set_event_args::pad
uint32_t pad
Definition: kfd_ioctl.h:230
kfd_ioctl_ipc_export_handle_args
Definition: kfd_ioctl.h:359
kfd_ioctl_create_event_args::event_id
uint32_t event_id
Definition: kfd_ioctl.h:219
kfd_process_device_apertures::lds_limit
uint64_t lds_limit
Definition: kfd_ioctl.h:127
kfd_ioctl_free_memory_of_gpu_args
Definition: kfd_ioctl.h:303
kfd_ioctl_destroy_queue_args::queue_id
uint32_t queue_id
Definition: kfd_ioctl.h:66
kfd_ioctl_wait_events_args::num_events
uint32_t num_events
Definition: kfd_ioctl.h:267
kfd_ioctl_set_trap_handler_args::pad
uint32_t pad
Definition: kfd_ioctl.h:103
kfd_ioctl_alloc_memory_of_gpu_args::va_addr
uint64_t va_addr
Definition: kfd_ioctl.h:295
kfd_ioctl_get_process_apertures_new_args::num_of_nodes
uint32_t num_of_nodes
Definition: kfd_ioctl.h:158
kfd_ioctl_create_queue_args::queue_percentage
uint32_t queue_percentage
Definition: kfd_ioctl.h:54
kfd_ioctl_create_event_args::auto_reset
uint32_t auto_reset
Definition: kfd_ioctl.h:216
kfd_ioctl_get_clock_counters_args
Definition: kfd_ioctl.h:113
kfd_ioctl_create_event_args::node_id
uint32_t node_id
Definition: kfd_ioctl.h:217

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17