diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-09-01 11:36:16 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-09-01 11:36:16 +0100 |
commit | 049607ff3386ed38060862733cb63a6799571a28 (patch) | |
tree | 6f96f23511405efce53a82b81735ee8e69df90ee /tools/firmware | |
parent | bfc341a65cfb2f58040be14f0eb56a794217d773 (diff) | |
download | xen-049607ff3386ed38060862733cb63a6799571a28.tar.gz xen-049607ff3386ed38060862733cb63a6799571a28.tar.bz2 xen-049607ff3386ed38060862733cb63a6799571a28.zip |
x86 passthru:: graphics passthrough
This patch supports basic gfx passthrough on xen side:
- add a VGA type for gfx passthrough, and get the size of VGA bios
of passthrouged gfx in hvmloader
- add a config option 'gfx_passthru' for gfx passthrough
Signed-off-by: Ben Lin <ben.y.lin@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Diffstat (limited to 'tools/firmware')
-rw-r--r-- | tools/firmware/hvmloader/hvmloader.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index c154eff952..581bcafc52 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -113,7 +113,7 @@ asm ( unsigned long pci_mem_start = PCI_MEM_START; unsigned long pci_mem_end = PCI_MEM_END; -static enum { VGA_none, VGA_std, VGA_cirrus } virtual_vga = VGA_none; +static enum { VGA_none, VGA_std, VGA_cirrus, VGA_pt } virtual_vga = VGA_none; static void init_hypercalls(void) { @@ -212,8 +212,10 @@ static void pci_setup(void) case 0x0300: if ( (vendor_id == 0x1234) && (device_id == 0x1111) ) virtual_vga = VGA_std; - if ( (vendor_id == 0x1013) && (device_id == 0xb8) ) + else if ( (vendor_id == 0x1013) && (device_id == 0xb8) ) virtual_vga = VGA_cirrus; + else + virtual_vga = VGA_pt; break; case 0x0680: /* PIIX4 ACPI PM. Special device with special PCI config space. */ @@ -685,6 +687,11 @@ int main(void) vgabios_stdvga, sizeof(vgabios_stdvga)); vgabios_sz = round_option_rom(sizeof(vgabios_stdvga)); break; + case VGA_pt: + printf("Loading VGABIOS of passthroughed gfx ...\n"); + vgabios_sz = + round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512); + break; default: printf("No emulated VGA adaptor ...\n"); break; |