aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/hdt/hdt-cli-pci.c1
-rw-r--r--com32/hdt/hdt-menu-pci.c9
-rw-r--r--com32/include/sys/pci.h1
-rw-r--r--com32/lib/pci/scan.c1
4 files changed, 10 insertions, 2 deletions
diff --git a/com32/hdt/hdt-cli-pci.c b/com32/hdt/hdt-cli-pci.c
index 06eea9f7..b0b33c54 100644
--- a/com32/hdt/hdt-cli-pci.c
+++ b/com32/hdt/hdt-cli-pci.c
@@ -103,6 +103,7 @@ void show_pci_device(struct s_hardware *hardware, const char *item) {
more_printf("Revision : %02x\n",pci_device->revision);
if ((pci_device->dev_info->irq>0) && (pci_device->dev_info->irq<255))
more_printf("IRQ : %0d\n",pci_device->dev_info->irq);
+ more_printf("Latency : %0d\n",pci_device->dev_info->latency);
more_printf("PCI Bus : %02d\n",bus);
more_printf("PCI Slot : %02d\n",slot);
more_printf("PCI Func : %02d\n",func);
diff --git a/com32/hdt/hdt-menu-pci.c b/com32/hdt/hdt-menu-pci.c
index 5c16a6ad..b3c32f22 100644
--- a/com32/hdt/hdt-menu-pci.c
+++ b/com32/hdt/hdt-menu-pci.c
@@ -65,12 +65,17 @@ void compute_pci_device(struct s_my_menu *menu,struct pci_device *pci_device,int
menu->items_count++;
if ((pci_device->dev_info->irq>0) && (pci_device->dev_info->irq<255)) {
- snprintf(buffer,sizeof buffer,"IRQ : %02d",pci_device->dev_info->irq);
- snprintf(statbuffer,sizeof statbuffer,"IRQ : %02d",pci_device->dev_info->irq);
+ snprintf(buffer,sizeof buffer,"IRQ : %d",pci_device->dev_info->irq);
+ snprintf(statbuffer,sizeof statbuffer,"IRQ : %d",pci_device->dev_info->irq);
add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
menu->items_count++;
}
+ snprintf(buffer,sizeof buffer,"Latency : %d",pci_device->dev_info->latency);
+ snprintf(statbuffer,sizeof statbuffer,"Latency : %d",pci_device->dev_info->latency);
+ add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
+ menu->items_count++;
+
if (pci_device->dev_info->linux_kernel_module_count>1) {
for (int i=0; i<pci_device->dev_info->linux_kernel_module_count;i++) {
if (i>0) {
diff --git a/com32/include/sys/pci.h b/com32/include/sys/pci.h
index 48b56af8..18e97548 100644
--- a/com32/include/sys/pci.h
+++ b/com32/include/sys/pci.h
@@ -31,6 +31,7 @@ struct pci_dev_info {
char class_name[PCI_CLASS_NAME_SIZE]; /* The most precise class name */
char category_name[PCI_CLASS_NAME_SIZE]; /*The general category*/
uint8_t irq;
+ uint8_t latency;
};
/* PCI device (really, function) */
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c
index 1e1dce2b..dd5d6402 100644
--- a/com32/lib/pci/scan.c
+++ b/com32/lib/pci/scan.c
@@ -539,6 +539,7 @@ void gather_additional_pci_config(struct pci_domain *domain)
return;
}
dev->dev_info->irq = pci_readb(a + 0x3c);
+ dev->dev_info->latency = pci_readb(a + 0x0d);
}
}
}