1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Print PCIe device ID, if available

This commit is contained in:
Alex Forencich 2022-03-03 22:44:05 -08:00
parent d9e79c9923
commit d5f1da7f08
3 changed files with 21 additions and 0 deletions

View File

@ -228,6 +228,13 @@ int main(int argc, char *argv[])
return -1;
}
if (dev->pci_device_path)
{
char *ptr = strrchr(dev->pci_device_path, '/');
if (ptr)
printf("PCIe ID: %s\n", ptr+1);
}
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
printf("FW ID: 0x%08x\n", dev->fw_id);
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,

View File

@ -144,6 +144,13 @@ int main(int argc, char *argv[])
return -1;
}
if (dev->pci_device_path)
{
char *ptr = strrchr(dev->pci_device_path, '/');
if (ptr)
printf("PCIe ID: %s\n", ptr+1);
}
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
printf("FW ID: 0x%08x\n", dev->fw_id);
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,

View File

@ -99,6 +99,13 @@ int main(int argc, char *argv[])
return -1;
}
if (dev->pci_device_path)
{
char *ptr = strrchr(dev->pci_device_path, '/');
if (ptr)
printf("PCIe ID: %s\n", ptr+1);
}
printf("Device-level register blocks:\n");
for (struct reg_block *rb = dev->rb_list; rb->type && rb->version; rb++)
printf(" type 0x%08x (v %d.%d.%d.%d)\n", rb->type, rb->version >> 24,