ia64/xen-unstable

changeset 18921:7802a247e6f9

hvmloader: enable bus mastering of PCI device

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

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 11 13:26:02 2008 +0000 (2008-12-11)
parents df32584505c2
children 68b76ad4faf7
files tools/firmware/hvmloader/hvmloader.c
line diff
     1.1 --- a/tools/firmware/hvmloader/hvmloader.c	Thu Dec 11 13:25:28 2008 +0000
     1.2 +++ b/tools/firmware/hvmloader/hvmloader.c	Thu Dec 11 13:26:02 2008 +0000
     1.3 @@ -269,6 +269,11 @@ static void pci_setup(void)
     1.4              printf("pci dev %02x:%x INT%c->IRQ%u\n",
     1.5                     devfn>>3, devfn&7, 'A'+pin-1, isa_irq);
     1.6          }
     1.7 +
     1.8 +        /* Enable bus mastering. */
     1.9 +        cmd = pci_readw(devfn, PCI_COMMAND);
    1.10 +        cmd |= PCI_COMMAND_MASTER;
    1.11 +        pci_writew(devfn, PCI_COMMAND, cmd);
    1.12      }
    1.13  
    1.14      /* Assign iomem and ioport resources in descending order of size. */