105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/****************************************************************************
205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************
305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   This header was automatically generated from a Linux kernel header
505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   of the same name, to make information necessary for userspace to
605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   call into the kernel available to libc.  It contains only constants,
705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   structures, and macros generated from the original header, and thus,
805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   contains no copyrightable information.
905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   To edit the content of this header, modify the corresponding
1105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   source file (e.g. under external/kernel-headers/original/) then
1205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   run bionic/libc/kernel/tools/update_all.py
1305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   Any manual change here will be lost the next time this script will
1505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   be run. You've been warned!
1605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************
1805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************/
1905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#ifndef KFD_IOCTL_H_INCLUDED
2005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOCTL_H_INCLUDED
2105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#include <linux/types.h>
2205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#include <linux/ioctl.h>
2305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
2405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOCTL_MAJOR_VERSION 1
2505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOCTL_MINOR_VERSION 1
2605d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_get_version_args {
2705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t major_version;
2805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
2905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t minor_version;
3005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
3105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_QUEUE_TYPE_COMPUTE 0
3205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_QUEUE_TYPE_SDMA 1
3305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
3405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_QUEUE_TYPE_COMPUTE_AQL 2
3505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_MAX_QUEUE_PERCENTAGE 100
3605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_MAX_QUEUE_PRIORITY 15
3705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_create_queue_args {
3805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
3905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t ring_base_address;
4005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t write_pointer_address;
4105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t read_pointer_address;
4205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t doorbell_offset;
4305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
4405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ring_size;
4505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
4605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_type;
4705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_percentage;
4805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
4905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_priority;
5005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_id;
5105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t eop_buffer_address;
5205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t eop_buffer_size;
5305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
5405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t ctx_save_restore_address;
5505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t ctx_save_restore_size;
5605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
5705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_destroy_queue_args {
5805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
5905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_id;
6005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
6105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
6205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_update_queue_args {
6305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
6405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t ring_base_address;
6505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_id;
6605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ring_size;
6705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_percentage;
6805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
6905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t queue_priority;
7005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
7105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_CACHE_POLICY_COHERENT 0
7205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
7305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
7405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_set_memory_policy_args {
7505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t alternate_aperture_base;
7605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t alternate_aperture_size;
7705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
7805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
7905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t default_policy;
8005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t alternate_policy;
8105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
8205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
8305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
8405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_get_clock_counters_args {
8505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t gpu_clock_counter;
8605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t cpu_clock_counter;
8705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t system_clock_counter;
8805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
8905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t system_clock_freq;
9005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
9105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
9205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
9305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
9405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define NUM_OF_SUPPORTED_GPUS 7
9505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_process_device_apertures {
9605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t lds_base;
9705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t lds_limit;
9805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
9905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t scratch_base;
10005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t scratch_limit;
10105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t gpuvm_base;
10205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t gpuvm_limit;
10305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
10405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
10505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
10605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
10705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_get_process_apertures_args {
10805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
10905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct kfd_process_device_apertures process_apertures[NUM_OF_SUPPORTED_GPUS];
11005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_of_nodes;
11105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
11205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
11305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
11405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define MAX_ALLOWED_NUM_POINTS 100
11505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define MAX_ALLOWED_AW_BUFF_SIZE 4096
11605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define MAX_ALLOWED_WAC_BUFF_SIZE 128
11705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_dbg_register_args {
11805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
11905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
12005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
12105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
12205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_dbg_unregister_args {
12305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
12405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
12505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
12605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
12705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_dbg_address_watch_args {
12805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
12905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t content_ptr;
13005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
13105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t buf_size_in_bytes;
13205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
13305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
13405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_dbg_wave_control_args {
13505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t content_ptr;
13605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
13705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t buf_size_in_bytes;
13805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
13905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
14005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_SIGNAL 0
14105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_NODECHANGE 1
14205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_DEVICESTATECHANGE 2
14305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
14405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_HW_EXCEPTION 3
14505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_SYSTEM_EVENT 4
14605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_DEBUG_EVENT 5
14705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_PROFILE_EVENT 6
14805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
14905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_QUEUE_EVENT 7
15005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_EVENT_MEMORY 8
15105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_WAIT_RESULT_COMPLETE 0
15205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_WAIT_RESULT_TIMEOUT 1
15305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
15405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_IOC_WAIT_RESULT_FAIL 2
15505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define KFD_SIGNAL_EVENT_LIMIT 256
15605d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_create_event_args {
15705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t event_page_offset;
15805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
15905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_trigger_data;
16005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_type;
16105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t auto_reset;
16205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t node_id;
16305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
16405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_id;
16505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_slot_index;
16605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
16705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_destroy_event_args {
16805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
16905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_id;
17005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
17105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
17205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_set_event_args {
17305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
17405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_id;
17505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
17605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
17705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_reset_event_args {
17805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
17905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_id;
18005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
18105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
18205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_memory_exception_failure {
18305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
18405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t NotPresent;
18505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ReadOnly;
18605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t NoExecute;
18705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
18805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
18905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
19005d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_hsa_memory_exception_data {
19105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct kfd_memory_exception_failure failure;
19205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t va;
19305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
19405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_id;
19505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
19605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
19705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_event_data {
19805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
19905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  union {
20005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct kfd_hsa_memory_exception_data memory_exception_data;
20105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  };
20205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t kfd_event_data_ext;
20305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
20405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t event_id;
20505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pad;
20605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
20705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct kfd_ioctl_wait_events_args {
20805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
20905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t events_ptr;
21005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_events;
21105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t wait_for_all;
21205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t timeout;
21305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
21405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t wait_result;
21505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
21605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOCTL_BASE 'K'
21705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
21805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
21905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOR(nr,type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
22005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOW(nr,type) _IOW(AMDKFD_IOCTL_BASE, nr, type)
22105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOWR(nr,type) _IOWR(AMDKFD_IOCTL_BASE, nr, type)
22205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_GET_VERSION AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args)
22305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
22405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_CREATE_QUEUE AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args)
22505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DESTROY_QUEUE AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args)
22605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_SET_MEMORY_POLICY AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args)
22705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_GET_CLOCK_COUNTERS AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args)
22805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
22905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_GET_PROCESS_APERTURES AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args)
23005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_UPDATE_QUEUE AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args)
23105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_CREATE_EVENT AMDKFD_IOWR(0x08, struct kfd_ioctl_create_event_args)
23205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DESTROY_EVENT AMDKFD_IOW(0x09, struct kfd_ioctl_destroy_event_args)
23305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
23405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_SET_EVENT AMDKFD_IOW(0x0A, struct kfd_ioctl_set_event_args)
23505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_RESET_EVENT AMDKFD_IOW(0x0B, struct kfd_ioctl_reset_event_args)
23605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_WAIT_EVENTS AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args)
23705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DBG_REGISTER AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args)
23805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
23905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DBG_UNREGISTER AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args)
24005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DBG_ADDRESS_WATCH AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args)
24105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_IOC_DBG_WAVE_CONTROL AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args)
24205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_COMMAND_START 0x01
24305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDKFD_COMMAND_END 0x11
24505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#endif
246