History

drm/amdkfd: display debug capabilities

Expose debug capabilities in the KFD topology node's HSA capabilities and debug properties flags. Ensure correct capabilities are exposed based on firmware support. Flag definitions can be referenced in uapi/linux/kfd_sysfs.h.

Jonathan Kim committed 4 years ago

Commit d230f1b1 parent 4f98cf23 files · +117 −5Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/kfd_sysfs.h+15−0
@@ -43,6 +43,11 @@ · 42 unmodified lines
4343 #define HSA_CAP_DOORBELL_TYPE_2_0 0x2
4444 #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP 0x00004000
4545
46+#define HSA_CAP_TRAP_DEBUG_SUPPORT 0x00008000
47+#define HSA_CAP_TRAP_DEBUG_WAVE_LAUNCH_TRAP_OVERRIDE_SUPPORTED 0x00010000
48+#define HSA_CAP_TRAP_DEBUG_WAVE_LAUNCH_MODE_SUPPORTED 0x00020000
49+#define HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED 0x00040000
50+
4651 /* Old buggy user mode depends on this being 0 */
4752 #define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED 0x00080000
4853
@@ -53,8 +58,18 @@ · 4 unmodified lines
5358 #define HSA_CAP_SRAM_EDCSUPPORTED 0x04000000
5459 #define HSA_CAP_SVMAPI_SUPPORTED 0x08000000
5560 #define HSA_CAP_FLAGS_COHERENTHOSTACCESS 0x10000000
61+#define HSA_CAP_TRAP_DEBUG_FIRMWARE_SUPPORTED 0x20000000
5662 #define HSA_CAP_RESERVED 0xe00f8000
5763
64+/* debug_prop bits in node properties */
65+#define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f
66+#define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_SHIFT 0
67+#define HSA_DBG_WATCH_ADDR_MASK_HI_BIT_MASK 0x000003f0
68+#define HSA_DBG_WATCH_ADDR_MASK_HI_BIT_SHIFT 4
69+#define HSA_DBG_DISPATCH_INFO_ALWAYS_VALID 0x00000400
70+#define HSA_DBG_WATCHPOINTS_EXCLUSIVE 0x00000800
71+#define HSA_DBG_RESERVED 0xfffffffffffff000ull
72+
5873 /* Heap types in memory properties */
5974 #define HSA_MEM_HEAP_TYPE_SYSTEM 0
6075 #define HSA_MEM_HEAP_TYPE_FB_PUBLIC 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t