MCPcopy Create free account
hub / github.com/coreboot/coreboot / dump_superio

Function dump_superio

util/superiotool/superiotool.c:214–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void 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(&reg_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
258void dump_io(uint16_t iobase, uint16_t length)
259{

Callers 15

probe_idregs_amdFunction · 0.85
probe_idregs_smsc_helperFunction · 0.85
probe_idregs_ite_helperFunction · 0.85
probe_idregs_aspeedFunction · 0.85
probe_idregs_fintekFunction · 0.85
probe_idregs_exarFunction · 0.85
probe_idregs_aliFunction · 0.85
probe_idregs_nscFunction · 0.85
probe_idregs_microchipFunction · 0.85

Calls 2

dump_regsFunction · 0.85
printfFunction · 0.85

Tested by

no test coverage detected