Skip to contentSkip to conversation

hvmloader: enable bus mastering of PCI device

PATCH New Kouya Shimura 1 participant 1 message Dec 11, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hvmloader: enable bus mastering of PCI device

Without this, init routine in some PCI option ROM doesn't work well.

tools/firmware/hvmloader/hvmloader.c +5 -0
diff -r 6401c9533ef5 tools/firmware/hvmloader/hvmloader.c
@@ -269,6 +269,11 @@ static void pci_setup(void)
             printf("pci dev %02x:%x INT%c->IRQ%u\n",
                    devfn>>3, devfn&7, 'A'+pin-1, isa_irq);
         }
+
+        /* Enable bus mastering. */
+        cmd = pci_readw(devfn, PCI_COMMAND);
+        cmd |= PCI_COMMAND_MASTER;
+        pci_writew(devfn, PCI_COMMAND, cmd);
     }
 
     /* Assign iomem and ioport resources in descending order of size. */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel