diff options
| author | Benjamin Hadad IV <bh4@unc.edu> | 2023-07-13 12:13:17 -0400 |
|---|---|---|
| committer | Benjamin Hadad IV <bh4@unc.edu> | 2023-07-13 12:13:17 -0400 |
| commit | bfb4dcf0e78954c0163f3a06a5a088c4d1b437a8 (patch) | |
| tree | 5288dc03523647f01d9952557b282b1019daa774 /nvdebug.h | |
| parent | 068e7f4e7208d6c9250ad72208e0b36fd9fdf2f6 (diff) | |
This commit is to update the repo for display during a meeting.
- Added an Ampere version of the device info data.
- Added Ampere versions of auxillary functions.
- Modified display functions to accommodate Ampere data.
- Made other various small modifications.
Diffstat (limited to 'nvdebug.h')
| -rw-r--r-- | nvdebug.h | 37 |
1 files changed, 16 insertions, 21 deletions
| @@ -554,34 +554,30 @@ static const char* const ENGINE_TYPES_NAMES[ENGINE_TYPES_LEN] = { | |||
| 554 | 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. |
| 555 | */ | 555 | */ |
| 556 | 556 | ||
| 557 | #ifdef NV_BUILD_FOR_AMPERE | 557 | #define NV_PTOP_DEVICE_INFO_AMPERE(i) (0x00022800+(i)*4) |
| 558 | #define NV_PTOP_DEVICE_INFO(i) (0x00022800+(i)*4) | 558 | #define NV_PTOP_DEVICE_INFO_PREVIOUS(i) (0x00022700+(i)*4) |
| 559 | #define NV_PTOP_DEVICE_INFO__SIZE_1 64 | 559 | #define NV_PTOP_DEVICE_INFO__SIZE_1 64 |
| 560 | typedef union { | 560 | typedef union { |
| 561 | struct { | 561 | struct { |
| 562 | uint32_t fault_id:7; | 562 | uint32_t fault_id_ampere:7; |
| 563 | uint32_t padding0:9; | 563 | uint32_t padding0_ampere:9; |
| 564 | uint32_t inst_id:4; | 564 | uint32_t inst_id_ampere:4; |
| 565 | uint32_t padding1:4; | 565 | uint32_t padding1_ampere:4; |
| 566 | enum ENGINE_TYPES engine_type:7; | 566 | enum ENGINE_TYPES engine_type_ampere:7; |
| 567 | bool has_next_entry:1; | 567 | bool has_next_entry_ampere:1; |
| 568 | } __attribute__((packed)); | 568 | } __attribute__((packed)); |
| 569 | struct { | 569 | struct { |
| 570 | uint32_t reset_enum:5; | 570 | uint32_t reset_enum_ampere:5; |
| 571 | uint32_t padding2:7; | 571 | uint32_t padding2_ampere:7; |
| 572 | uint32_t pri_base:12; | 572 | uint32_t pri_base_ampere:12; |
| 573 | uint32_t padding3_ampere:8; | ||
| 573 | } __attribute__((packed)); | 574 | } __attribute__((packed)); |
| 574 | struct { | 575 | struct { |
| 575 | uint32_t engine_enum:2; | 576 | uint32_t engine_enum_ampere:2; |
| 576 | uint32_t padding3:4; | 577 | uint32_t padding4_ampere:4; |
| 577 | uint32_t runlist_enum:14; | 578 | uint32_t runlist_enum_ampere:14; |
| 579 | uint32_t padding5_ampere:12; | ||
| 578 | } __attribute__((packed)); | 580 | } __attribute__((packed)); |
| 579 | uint32_t raw; | ||
| 580 | } ptop_device_info_t; | ||
| 581 | #else | ||
| 582 | #define NV_PTOP_DEVICE_INFO(i) (0x00022700+(i)*4) | ||
| 583 | #define NV_PTOP_DEVICE_INFO__SIZE_1 64 | ||
| 584 | typedef union { | ||
| 585 | // DATA type fields | 581 | // DATA type fields |
| 586 | struct { | 582 | struct { |
| 587 | enum DEVICE_INFO_TYPE info_type:2; | 583 | enum DEVICE_INFO_TYPE info_type:2; |
| @@ -619,7 +615,6 @@ typedef union { | |||
| 619 | } __attribute__((packed)); | 615 | } __attribute__((packed)); |
| 620 | uint32_t raw; | 616 | uint32_t raw; |
| 621 | } ptop_device_info_t; | 617 | } ptop_device_info_t; |
| 622 | #endif | ||
| 623 | 618 | ||
| 624 | #define NV_PTOP_SCAL_NUM_GPCS 0x00022430 | 619 | #define NV_PTOP_SCAL_NUM_GPCS 0x00022430 |
| 625 | #define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434 | 620 | #define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434 |
