]> Zhao Yanbai Git Server - minix.git/commitdiff
Enhancing /proc/pci 72/2872/2
authorLionel Sambuc <lionel@minix3.org>
Fri, 17 Oct 2014 16:33:00 +0000 (18:33 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 10 Nov 2014 13:43:27 +0000 (14:43 +0100)
 - Adding missing fields for PCI device lookup
 - Adding the domain (for now set to zero) as part of the slot name

Change-Id: Iebaf3b21f6ab5024738cbc1dea66d5ad3ada175d

etc/usr/rc
minix/drivers/storage/ramdisk/rc
minix/fs/procfs/root.c

index 574b0bc3dffd25c2be7724c2e35c4364c9bf5e64..f540bdf97a23ca8fb22ba2e00375981053e46fa1 100644 (file)
@@ -208,7 +208,7 @@ start|autoboot)
     then
        up -n printer -dev /dev/lp -period 10HZ
        # start VirtualBox time sync driver if the device is there
-       if grep '^[^ ]* [^ ]* 80EE:CAFE ' /proc/pci >/dev/null; then
+       if grep '^[^ ]* [^ ]* 80EE:CAFE[^ ]* ' /proc/pci >/dev/null; then
                up -n vbox -period 10HZ
        fi
     fi
index 5c8fc941a593401c44cc52b1668e035bb1c4bfc8..6dd84c3cd9ad0c9ff29ce8566f744e8ba5ab59c1 100644 (file)
@@ -25,7 +25,7 @@ then  if [ -e $ACPI -a -n "`sysenv acpi`" ]
        # If not specified, default to yes if the device is found.
        if /bin/sysenv virtio_blk >/dev/null
        then    virtio_blk="`/bin/sysenv virtio_blk`"
-        elif   grep '^[^ ]* [^ ]* 1AF4:1001 ' /proc/pci >/dev/null
+        elif   grep '^[^ ]* [^ ]* 1AF4:1001[^ ]* ' /proc/pci >/dev/null
        then    echo "virtio_blk not set, defaulting to using found virtio device."
                virtio_blk=yes
         fi
index 5eaf10ed657ecdc0bd5c3535fe42c2645a0f845e..423d7739018bbd33a09c3243124fd3108f808184 100644 (file)
@@ -127,8 +127,8 @@ static void root_pci(void)
 {
        /* Print information about PCI devices present in the system.
         */
-       u16_t vid, did;
-       u8_t bcr, scr, pifr;
+       u16_t vid, did, subvid, subdid;
+       u8_t bcr, scr, pifr, rev;
        char *slot_name, *dev_name;
        int r, devind;
        static int first = TRUE;
@@ -148,10 +148,14 @@ static void root_pci(void)
                bcr = pci_attr_r8(devind, PCI_BCR);
                scr = pci_attr_r8(devind, PCI_SCR);
                pifr = pci_attr_r8(devind, PCI_PIFR);
-
-               buf_printf("%s %x/%x/%x %04X:%04X %s\n",
-                       slot_name ? slot_name : "-",
-                       bcr, scr, pifr, vid, did,
+               rev = pci_attr_r8(devind, PCI_REV);
+               subvid = pci_attr_r16(devind, PCI_SUBVID);
+               subdid = pci_attr_r16(devind, PCI_SUBDID);
+
+               buf_printf("%s %x/%x/%x/%x %04X:%04X:%04X:%04X %s\n",
+                       slot_name ? slot_name : "-1.-1.-1.-1",
+                       bcr, scr, pifr, rev,
+                       vid, did, subvid, subdid,
                        dev_name ? dev_name : "");
 
                r = pci_next_dev(&devind, &vid, &did);