Commit e110ddd0 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

proto,dummy_nic: pass vendor/device/revision/class ids to host

parent ff94c928
...@@ -81,6 +81,12 @@ int main(int argc, char *argv[]) ...@@ -81,6 +81,12 @@ int main(int argc, char *argv[])
di.bars[2].len = 128; di.bars[2].len = 128;
di.bars[2].flags = COSIM_PCIE_PROTO_BAR_IO; di.bars[2].flags = COSIM_PCIE_PROTO_BAR_IO;
di.pci_vendor_id = 0x4321;
di.pci_device_id = 0x1234;
di.pci_class = 0x02;
di.pci_subclass = 0x00;
di.pci_revision = 0x00;
if (uxsocket_send(pci_cfd, &di, sizeof(di), shm_fd)) { if (uxsocket_send(pci_cfd, &di, sizeof(di), shm_fd)) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
......
...@@ -48,6 +48,17 @@ struct cosim_pcie_proto_dev_intro { ...@@ -48,6 +48,17 @@ struct cosim_pcie_proto_dev_intro {
/** flags (see COSIM_PCIE_PROTO_BAR_*) */ /** flags (see COSIM_PCIE_PROTO_BAR_*) */
uint64_t flags; uint64_t flags;
} __attribute__((packed)) bars[COSIM_PCIE_PROTO_NBARS]; } __attribute__((packed)) bars[COSIM_PCIE_PROTO_NBARS];
/** PCI vendor id */
uint16_t pci_vendor_id;
/** PCI device id */
uint16_t pci_device_id;
/* PCI class */
uint8_t pci_class;
/* PCI subclass */
uint8_t pci_subclass;
/* PCI revision */
uint8_t pci_revision;
} __attribute__((packed)); } __attribute__((packed));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment