When printing out the contents of the VSEC, include the contents of the
headers. Device documentation often times give offsets relative to the start of the entire VSEC, not just the post-header data area, so this change makes it easier to correlate offsets.
This commit is contained in:
parent
15fe251399
commit
e1ae0ee172
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359187
@ -898,13 +898,15 @@ ecap_vendor(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver)
|
|||||||
if ((ver < 1) || (cap_level <= 1))
|
if ((ver < 1) || (cap_level <= 1))
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < len; i += 4) {
|
for (i = 0; i < len; i += 4) {
|
||||||
val = read_config(fd, &p->pc_sel, ptr + PCIR_VSEC_DATA + i, 4);
|
val = read_config(fd, &p->pc_sel, ptr + i, 4);
|
||||||
if ((i % 16) == 0)
|
if ((i % 16) == 0)
|
||||||
printf(" ");
|
printf(" ");
|
||||||
printf("%02x %02x %02x %02x ", val & 0xff, (val >> 8) & 0xff,
|
printf("%02x %02x %02x %02x", val & 0xff, (val >> 8) & 0xff,
|
||||||
(val >> 16) & 0xff, (val >> 24) & 0xff);
|
(val >> 16) & 0xff, (val >> 24) & 0xff);
|
||||||
if ((((i + 4) % 16) == 0 ) || ((i + 4) >= len))
|
if ((((i + 4) % 16) == 0 ) || ((i + 4) >= len))
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
else
|
||||||
|
printf(" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user