mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
feature(debugger): Add initial Xe debugger skeleton
sync xe_drm.h for debugger to 1d2144ed from https://gitlab.freedesktop.org/miku/kernel/-/tree/eudebug-dev Related-to: NEO-8402 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
104310b113
commit
fd48de3da9
1221
third_party/uapi-eudebug/drm/drm.h
vendored
Normal file
1221
third_party/uapi-eudebug/drm/drm.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1222
third_party/uapi-eudebug/drm/drm_mode.h
vendored
Normal file
1222
third_party/uapi-eudebug/drm/drm_mode.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1202
third_party/uapi-eudebug/drm/xe_drm.h
vendored
Normal file
1202
third_party/uapi-eudebug/drm/xe_drm.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
172
third_party/uapi-eudebug/drm/xe_drm_tmp.h
vendored
Normal file
172
third_party/uapi-eudebug/drm/xe_drm_tmp.h
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright © 2023 Intel Corporation
|
||||
*/
|
||||
#ifndef _UAPI_XE_DRM_TMP_H_
|
||||
#define _UAPI_XE_DRM_TMP_H_
|
||||
|
||||
#include "xe_drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_XE_EUDEBUG_CONNECT 0x5f
|
||||
|
||||
#define DRM_IOCTL_XE_EUDEBUG_CONNECT DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EUDEBUG_CONNECT, struct drm_xe_eudebug_connect)
|
||||
|
||||
/**
|
||||
* Do a eudebug event read for a debugger connection.
|
||||
*
|
||||
* This ioctl is available in debug version 1.
|
||||
*/
|
||||
#define DRM_XE_EUDEBUG_IOCTL_READ_EVENT _IO('j', 0x0)
|
||||
#define DRM_XE_EUDEBUG_IOCTL_EU_CONTROL _IOWR('j', 0x2, struct drm_xe_eudebug_eu_control)
|
||||
#define DRM_XE_EUDEBUG_IOCTL_VM_OPEN _IOW('j', 0x1, struct drm_xe_eudebug_vm_open)
|
||||
|
||||
/* XXX: Document events to match their internal counterparts when moved to xe_drm.h */
|
||||
struct drm_xe_eudebug_event {
|
||||
__u32 len;
|
||||
|
||||
__u16 type;
|
||||
#define DRM_XE_EUDEBUG_EVENT_NONE 0
|
||||
#define DRM_XE_EUDEBUG_EVENT_READ 1
|
||||
#define DRM_XE_EUDEBUG_EVENT_OPEN 2
|
||||
#define DRM_XE_EUDEBUG_EVENT_VM 3
|
||||
#define DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE 4
|
||||
#define DRM_XE_EUDEBUG_EVENT_EU_ATTENTION 5
|
||||
#define DRM_XE_EUDEBUG_EVENT_VM_BIND 6
|
||||
#define DRM_XE_EUDEBUG_EVENT_MAX_EVENT DRM_XE_EUDEBUG_EVENT_VM_BIND
|
||||
|
||||
__u16 flags;
|
||||
#define DRM_XE_EUDEBUG_EVENT_CREATE BIT(0)
|
||||
#define DRM_XE_EUDEBUG_EVENT_DESTROY BIT(1)
|
||||
#define DRM_XE_EUDEBUG_EVENT_STATE_CHANGE BIT(2)
|
||||
|
||||
__u64 seqno;
|
||||
__u64 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_client {
|
||||
struct drm_xe_eudebug_event base;
|
||||
|
||||
__u64 client_handle; /* This is unique per debug connection */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_vm {
|
||||
struct drm_xe_eudebug_event base;
|
||||
|
||||
__u64 client_handle;
|
||||
__u64 vm_handle;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_exec_queue {
|
||||
struct drm_xe_eudebug_event base;
|
||||
|
||||
__u64 client_handle;
|
||||
__u64 vm_handle;
|
||||
__u64 exec_queue_handle;
|
||||
__u16 engine_class;
|
||||
__u16 width;
|
||||
__u64 lrc_handle[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_eu_attention {
|
||||
struct drm_xe_eudebug_event base;
|
||||
__u64 client_handle;
|
||||
__u64 exec_queue_handle;
|
||||
__u64 lrc_handle;
|
||||
__u32 flags;
|
||||
__u32 bitmask_size;
|
||||
__u8 bitmask[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_vm_bind {
|
||||
struct drm_xe_eudebug_event base;
|
||||
__u64 client_handle;
|
||||
|
||||
__u64 vm_handle;
|
||||
__u64 va_start;
|
||||
__u64 va_length;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_metadata {
|
||||
struct drm_xe_eudebug_event base;
|
||||
|
||||
__u64 client_handle;
|
||||
|
||||
/* XXX: Refer to xe_drm.h for fields */
|
||||
__u64 type;
|
||||
__u64 user_addr;
|
||||
__u64 len;
|
||||
__u64 id;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_event_vm_set_metadata {
|
||||
struct drm_xe_eudebug_event base;
|
||||
|
||||
__u64 client_handle;
|
||||
__u64 vm_handle;
|
||||
|
||||
/* XXX: Refer to xe_drm.h for fields */
|
||||
__u64 type;
|
||||
union {
|
||||
__u64 cookie;
|
||||
__u64 offset;
|
||||
};
|
||||
__u64 len;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* Debugger ABI (ioctl and events) Version History:
|
||||
* 0 - No debugger available
|
||||
* 1 - Initial version
|
||||
*/
|
||||
#define DRM_XE_EUDEBUG_VERSION 1
|
||||
|
||||
struct drm_xe_eudebug_connect {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
__u64 extensions;
|
||||
|
||||
__u64 pid; /* input: Target process ID */
|
||||
__u32 flags; /* MBZ */
|
||||
|
||||
__u32 version; /* output: current ABI (ioctl / events) version */
|
||||
};
|
||||
|
||||
struct drm_xe_eudebug_eu_control {
|
||||
__u64 client_handle;
|
||||
__u32 cmd;
|
||||
#define DRM_XE_EUDEBUG_EU_CONTROL_CMD_INTERRUPT_ALL 0
|
||||
#define DRM_XE_EUDEBUG_EU_CONTROL_CMD_STOPPED 1
|
||||
#define DRM_XE_EUDEBUG_EU_CONTROL_CMD_RESUME 2
|
||||
__u32 flags;
|
||||
__u64 seqno;
|
||||
|
||||
struct drm_xe_engine_class_instance ci;
|
||||
__u32 bitmask_size;
|
||||
__u64 bitmask_ptr;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct drm_xe_eudebug_vm_open {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
__u64 extensions;
|
||||
|
||||
/** @client_handle: id of client */
|
||||
__u64 client_handle;
|
||||
|
||||
/** @vm_handle: id of vm */
|
||||
__u64 vm_handle;
|
||||
|
||||
/** @flags: flags */
|
||||
__u64 flags;
|
||||
|
||||
/** @timeout_ns: Timeout value in nanoseconds operations (fsync) */
|
||||
__u64 timeout_ns;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _UAPI_XE_DRM_TMP_H_ */
|
||||
Reference in New Issue
Block a user