| 212 | } |
| 213 | |
| 214 | void dump_superio(const char *vendor, |
| 215 | const struct superio_registers reg_table[], |
| 216 | uint16_t port, uint16_t id, uint8_t ldn_sel) |
| 217 | { |
| 218 | int i, j, no_dump_available = 1; |
| 219 | uint8_t ldn_dumped[256] = {0}; |
| 220 | |
| 221 | if (!dump) |
| 222 | return; |
| 223 | |
| 224 | for (i = 0; /* Nothing */; i++) { |
| 225 | if (reg_table[i].superio_id == EOT) |
| 226 | break; |
| 227 | |
| 228 | if ((uint16_t)reg_table[i].superio_id != id) |
| 229 | continue; |
| 230 | |
| 231 | for (j = 0; /* Nothing */; j++) { |
| 232 | if (reg_table[i].ldn[j].ldn == EOT) |
| 233 | break; |
| 234 | no_dump_available = 0; |
| 235 | ldn_dumped[reg_table[i].ldn[j].ldn] = 1; |
| 236 | dump_regs(®_table[i].ldn[j], port, ldn_sel); |
| 237 | } |
| 238 | |
| 239 | if (dump_unknown_ldns) { |
| 240 | for (int ldn = 0; ldn < 128; ldn++) { |
| 241 | if (!ldn_dumped[ldn]) { |
| 242 | const struct superio_registers_ldn fake_ldn = { |
| 243 | .ldn = ldn, |
| 244 | .name = "?", |
| 245 | .idx = {EOT}, |
| 246 | .def = {EOT} |
| 247 | }; |
| 248 | dump_regs(&fake_ldn, port, ldn_sel); |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | if (no_dump_available) |
| 254 | printf("No dump available for this Super I/O\n"); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | void dump_io(uint16_t iobase, uint16_t length) |
| 259 | { |
no test coverage detected