diff options
Diffstat (limited to 'device_info_procfs.c')
| -rw-r--r-- | device_info_procfs.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/device_info_procfs.c b/device_info_procfs.c index e94bef5..b139c36 100644 --- a/device_info_procfs.c +++ b/device_info_procfs.c | |||
| @@ -156,23 +156,30 @@ static int device_info_file_seq_show_ga100(struct seq_file *s, void *iter_raw) { | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | // Parse and print the data | 158 | // Parse and print the data |
| 159 | // Note: The goal of this interface is to present useful information to | ||
| 160 | // a human user, NOT to provide a stable format for scripts to parse. | ||
| 161 | // Because of this, we favor accurately printing the data in each entry, | ||
| 162 | // rather than providing stable (if imperfectly correct) field names | ||
| 159 | switch(iter->type_of_next_entry) { | 163 | switch(iter->type_of_next_entry) { |
| 160 | case 0: | 164 | case 0: |
| 161 | seq_printf(s, "| instance %d\n", curr_info.inst_id); | 165 | seq_printf(s, "| Engine Type: %3d (", curr_info.engine_type); |
| 162 | seq_printf(s, "| Fault ID: %3d\n", curr_info.fault_id); | ||
| 163 | seq_printf(s, "| Engine Type: %2d (", curr_info.engine_type); | ||
| 164 | if (curr_info.engine_type < ENGINE_TYPES_LEN) | 166 | if (curr_info.engine_type < ENGINE_TYPES_LEN) |
| 165 | seq_printf(s, "%s)\n", ENGINE_TYPES_NAMES[curr_info.engine_type]); | 167 | seq_printf(s, "%s)\n", ENGINE_TYPES_NAMES[curr_info.engine_type]); |
| 166 | else | 168 | else |
| 167 | seq_printf(s, "Unknown, introduced post-Lovelace)\n"); | 169 | seq_printf(s, "Unknown, introduced post-Lovelace)\n"); |
| 170 | seq_printf(s, "| instance %d\n", curr_info.inst_id); | ||
| 171 | seq_printf(s, "| Fault ID: %4d\n", curr_info.fault_id); | ||
| 168 | break; | 172 | break; |
| 169 | case 1: | 173 | case 1: |
| 170 | seq_printf(s, "| BAR0 Base %#.8x\n", curr_info.pri_base << 12); | 174 | seq_printf(s, "| BAR0 Base %#.8x\n", curr_info.pri_base << 8); |
| 171 | seq_printf(s, "| Reset ID: %2d\n", curr_info.reset_enum); | 175 | seq_printf(s, "| Reset ID: %3d\n", curr_info.reset_id); |
| 176 | seq_printf(s, "| Is Engine: %1d\n", curr_info.is_engine); | ||
| 177 | |||
| 172 | break; | 178 | break; |
| 173 | case 2: | 179 | case 2: |
| 174 | seq_printf(s, "| Host's Engine ID: %2d\n", curr_info.engine_enum); | 180 | seq_printf(s, "| Runlist Eng. ID: %1d\n", curr_info.rleng_id); |
| 175 | seq_printf(s, "| Runlist ID: %2d\n", curr_info.runlist_enum); | 181 | // Theoretically, we could extract an ID from the runlist RAM |
| 182 | seq_printf(s, "| RL Base: %#.8x\n", curr_info.runlist_pri_base << 10); | ||
| 176 | break; | 183 | break; |
| 177 | default: | 184 | default: |
| 178 | printk(KERN_WARNING "[nvdebug] Skipping unexpected continuation of device_info entry (idx: %d, raw: %#0x)\n", iter->idx, curr_info.raw); | 185 | printk(KERN_WARNING "[nvdebug] Skipping unexpected continuation of device_info entry (idx: %d, raw: %#0x)\n", iter->idx, curr_info.raw); |
