diff options
| author | Benjamin Hadad IV <bh4@unc.edu> | 2023-07-28 11:39:28 -0400 |
|---|---|---|
| committer | Benjamin Hadad IV <bh4@unc.edu> | 2023-07-28 11:39:28 -0400 |
| commit | 845960fc1b15995fdbd6d61c384567652a150bc4 (patch) | |
| tree | 14aad318d8694c6266576a1d45ced0d8fc502a6d /nvdebug.h | |
| parent | 8a57aaeba41c43233c323d7e0fc8bf1a81ebc65e (diff) | |
Refactored various systems and debugged minor issues
- Added device_info_iter
- Merged functions in device_info_procfs.c
- Separated device_info data structs by version in nvdebug.h
- Fixed issue with device_info runlist ID data
Diffstat (limited to 'nvdebug.h')
| -rw-r--r-- | nvdebug.h | 34 |
1 files changed, 19 insertions, 15 deletions
| @@ -567,25 +567,29 @@ static const char* const ENGINE_TYPES_NAMES[ENGINE_TYPES_LEN] = { | |||
| 567 | #define NV_PTOP_DEVICE_INFO_TYPE_COUNT 3 | 567 | #define NV_PTOP_DEVICE_INFO_TYPE_COUNT 3 |
| 568 | typedef union { | 568 | typedef union { |
| 569 | struct { | 569 | struct { |
| 570 | uint32_t fault_id_ampere:7; | 570 | uint32_t fault_id:7; |
| 571 | uint32_t padding0_ampere:9; | 571 | uint32_t padding0:9; |
| 572 | uint32_t inst_id_ampere:4; | 572 | uint32_t inst_id:4; |
| 573 | uint32_t padding1_ampere:4; | 573 | uint32_t padding1:4; |
| 574 | enum ENGINE_TYPES engine_type_ampere:7; | 574 | enum ENGINE_TYPES engine_type:7; |
| 575 | bool has_next_entry_ampere:1; | 575 | bool has_next_entry:1; |
| 576 | } __attribute__((packed)); | 576 | } __attribute__((packed)); |
| 577 | struct { | 577 | struct { |
| 578 | uint32_t reset_enum_ampere:5; | 578 | uint32_t reset_enum:5; |
| 579 | uint32_t padding2_ampere:7; | 579 | uint32_t padding2:7; |
| 580 | uint32_t pri_base_ampere:12; | 580 | uint32_t pri_base:12; |
| 581 | uint32_t padding3_ampere:8; | 581 | uint32_t padding3:8; |
| 582 | } __attribute__((packed)); | 582 | } __attribute__((packed)); |
| 583 | struct { | 583 | struct { |
| 584 | uint32_t engine_enum_ampere:2; | 584 | uint32_t engine_enum:2; |
| 585 | uint32_t padding4_ampere:4; | 585 | uint32_t padding4:8; |
| 586 | uint32_t runlist_enum_ampere:14; | 586 | uint32_t runlist_enum:14; |
| 587 | uint32_t padding5_ampere:12; | 587 | uint32_t padding5:8; |
| 588 | } __attribute__((packed)); | 588 | } __attribute__((packed)); |
| 589 | uint32_t raw; | ||
| 590 | } ptop_device_info_ampere_t; | ||
| 591 | |||
| 592 | typedef union { | ||
| 589 | // DATA type fields | 593 | // DATA type fields |
| 590 | struct { | 594 | struct { |
| 591 | enum DEVICE_INFO_TYPE info_type:2; | 595 | enum DEVICE_INFO_TYPE info_type:2; |
| @@ -622,7 +626,7 @@ typedef union { | |||
| 622 | uint32_t padding9:1; | 626 | uint32_t padding9:1; |
| 623 | } __attribute__((packed)); | 627 | } __attribute__((packed)); |
| 624 | uint32_t raw; | 628 | uint32_t raw; |
| 625 | } ptop_device_info_t; | 629 | } ptop_device_info_previous_t; |
| 626 | 630 | ||
| 627 | #define NV_PTOP_SCAL_NUM_GPCS 0x00022430 | 631 | #define NV_PTOP_SCAL_NUM_GPCS 0x00022430 |
| 628 | #define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434 | 632 | #define NV_PTOP_SCAL_NUM_TPC_PER_GPC 0x00022434 |
