Author: blueswirl Date: Sat May 19 12:38:24 2012 New Revision: 1058 URL: http://tracker.coreboot.org/trac/openbios/changeset/1058
Log: pci: identify virtio-scsi devices
Identify virtio SCSI device in PCI probe.
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/drivers/pci_database.c trunk/openbios-devel/include/drivers/pci.h
Modified: trunk/openbios-devel/drivers/pci_database.c ============================================================================== --- trunk/openbios-devel/drivers/pci_database.c Sat May 12 13:43:57 2012 (r1057) +++ trunk/openbios-devel/drivers/pci_database.c Sat May 19 12:38:24 2012 (r1058) @@ -45,6 +45,23 @@ }, };
+static const pci_dev_t scsi_devices[] = { + { + /* Virtio-block controller */ + PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_BLOCK, + NULL, "virtio-scsi", NULL, + "pci1af4,1001\0pci1af4,1001\0pciclass,01018f\0", + 0, 0, 0, + NULL, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + static const pci_dev_t ide_devices[] = { { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_646, /* CMD646 IDE controller */ @@ -64,7 +81,7 @@ static const pci_subclass_t mass_subclass[] = { { PCI_SUBCLASS_STORAGE_SCSI, "SCSI bus controller", - NULL, NULL, NULL, + "scsi", scsi_devices, NULL, NULL, NULL, }, {
Modified: trunk/openbios-devel/include/drivers/pci.h ============================================================================== --- trunk/openbios-devel/include/drivers/pci.h Sat May 12 13:43:57 2012 (r1057) +++ trunk/openbios-devel/include/drivers/pci.h Sat May 19 12:38:24 2012 (r1058) @@ -205,6 +205,9 @@ #define PCI_VENDOR_ID_QEMU 0x1234 #define PCI_DEVICE_ID_QEMU_VGA 0x1111
+#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 +#define PCI_DEVICE_ID_VIRTIO_BLOCK 0x1001 + #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_DEVICE_ID_INTEL_82441 0x1237