From: "Beng Heng, Ng" Subject: Re: Getting VGA Passthrough to work on Xen Unstable Date: Fri, 15 May 2009 08:53:36 -0400 Message-ID: <4A0D65D0.8050805@eecs.umich.edu> References: <4A0CA09B.6060708@eecs.umich.edu> <64C9D51EC34788takebe_akio@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <64C9D51EC34788takebe_akio@jp.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Akio Takebe Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Hi Akio, Thanks for the reply. I didn't make any changes to pci_load_option_roms. Did you mean pci_setup? :) - Beng Heng Akio Takebe wrote: > Hi, > > I suspect the VGA rom doesn't be loaded. > pci_load_option_roms() loads only mass stroage devices and serial bus controller. > You need to remove the ckeck. > > @tools/firmware/hvmloader/hvmloader.c > 476 static int pci_load_option_roms(uint32_t rom_base_addr) > 477 { > 478 uint32_t option_rom_addr, rom_phys_addr = rom_base_addr; > 479 uint16_t vendor_id, device_id; > 480 uint8_t devfn, class; > 481 > 482 for ( devfn = 0; devfn < 128; devfn++ ) > 483 { > 484 class = pci_readb(devfn, PCI_CLASS_DEVICE + 1); > 485 vendor_id = pci_readw(devfn, PCI_VENDOR_ID); > 486 device_id = pci_readw(devfn, PCI_DEVICE_ID); > 487 > 488 if ( (vendor_id == 0xffff) && (device_id == 0xffff) ) > 489 continue; > 490 > 491 /* > 492 * Currently only scan options from mass storage devices and serial > 493 * bus controller (Fibre Channel included). > 494 */ > 495 if ( (class != 0x1) && (class != 0xc) ) > 496 continue; > 497 > 498 option_rom_addr = pci_readl(devfn, PCI_ROM_ADDRESS); > 499 if ( !option_rom_addr ) > 500 continue; > 501 > 502 /* Ensure Expansion Bar is enabled before copying */ > 503 pci_writel(devfn, PCI_ROM_ADDRESS, option_rom_addr | 0x1); > 504 > 505 rom_phys_addr += scan_option_rom( > 506 devfn, vendor_id, device_id, > 507 (void *)(option_rom_addr & ~2047), rom_phys_addr); > 508 > 509 /* Restore the default original value of Expansion Bar */ > 510 pci_writel(devfn, PCI_ROM_ADDRESS, option_rom_addr); > 511 } > 512 > 513 return rom_phys_addr - rom_base_addr; > 514 } > > Best Regards, > > Akio Takebe