aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nvdebug.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/nvdebug.h b/nvdebug.h
index 968a60b..126c5e3 100644
--- a/nvdebug.h
+++ b/nvdebug.h
@@ -9,6 +9,8 @@
9#include <linux/version.h> // For KERNEL_VERSION and LINUX_VERSION_CODE 9#include <linux/version.h> // For KERNEL_VERSION and LINUX_VERSION_CODE
10#include <asm/io.h> 10#include <asm/io.h>
11 11
12#define NV_BUILD_FOR_AMPERE
13
12/* Runlist Channel 14/* Runlist Channel
13 A timeslice group (TSG) is composed of channels. Each channel is a FIFO queue 15 A timeslice group (TSG) is composed of channels. Each channel is a FIFO queue
14 of GPU commands. These commands are typically queued from userspace. 16 of GPU commands. These commands are typically queued from userspace.
@@ -551,6 +553,32 @@ static const char* const ENGINE_TYPES_NAMES[ENGINE_TYPES_LEN] = {
551 Support: Kepler, Maxwell, Pascal, Volta, Ampere 553 Support: Kepler, Maxwell, Pascal, Volta, Ampere
552 See dev_top.ref.txt of NVIDIA's open-gpu-doc for more info. 554 See dev_top.ref.txt of NVIDIA's open-gpu-doc for more info.
553*/ 555*/
556
557#ifdef NV_BUILD_FOR_AMPERE
558#define NV_PTOP_DEVICE_INFO(i) (0x00022800+(i)*4)
559#define NV_PTOP_DEVICE_INFO__SIZE_1 64
560typedef union {
561 struct {
562 uint32_t fault_id:7;
563 uint32_t padding0:9;
564 uint32_t inst_id:4;
565 uint32_t padding1:4;
566 enum ENGINE_TYPES engine_type:7;
567 bool has_next_entry:1;
568 } __attribute__((packed));
569 struct {
570 uint32_t reset_enum:5;
571 uint32_t padding2:7;
572 uint32_t pri_base:12;
573 } __attribute__((packed));
574 struct {
575 uint32_t engine_enum:2;
576 uint32_t padding3:4;
577 uint32_t runlist_enum:14;
578 } __attribute__((packed));
579 uint32_t raw;
580} ptop_device_info_t;
581#else
554#define NV_PTOP_DEVICE_INFO(i) (0x00022700+(i)*4) 582#define NV_PTOP_DEVICE_INFO(i) (0x00022700+(i)*4)
555#define NV_PTOP_DEVICE_INFO__SIZE_1 64 583#define NV_PTOP_DEVICE_INFO__SIZE_1 64
556typedef union { 584typedef union {
@@ -591,6 +619,7 @@ typedef union {
591 } __attribute__((packed)); 619 } __attribute__((packed));
592 uint32_t raw; 620 uint32_t raw;
593} ptop_device_info_t; 621} ptop_device_info_t;
622#endif
594 623
595#define NV_PTOP_SCAL_NUM_GPCS 0x00022430 624#define NV_PTOP_SCAL_NUM_GPCS 0x00022430
596#define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434 625#define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434