mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
VMware SVGA II emulation, by Andrzej Zaborowski.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2579 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
a4080ece74
commit
d34cab9f49
9 changed files with 1327 additions and 8 deletions
|
@ -3193,6 +3193,9 @@ void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
|
|||
vga_common_init((VGAState *)s,
|
||||
ds, vga_ram_base, vga_ram_offset, vga_ram_size);
|
||||
cirrus_init_common(s, device_id, 1);
|
||||
|
||||
graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump, s);
|
||||
|
||||
s->pci_dev = (PCIDevice *)d;
|
||||
|
||||
/* setup memory space */
|
||||
|
|
6
hw/pc.c
6
hw/pc.c
|
@ -664,6 +664,12 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
|
|||
isa_cirrus_vga_init(ds, phys_ram_base + vga_ram_addr,
|
||||
vga_ram_addr, vga_ram_size);
|
||||
}
|
||||
} else if (vmsvga_enabled) {
|
||||
if (pci_enabled)
|
||||
pci_vmsvga_init(pci_bus, ds, phys_ram_base + ram_size,
|
||||
ram_size, vga_ram_size);
|
||||
else
|
||||
fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
|
||||
} else {
|
||||
if (pci_enabled) {
|
||||
pci_vga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
|
||||
|
|
12
hw/vga.c
12
hw/vga.c
|
@ -1788,12 +1788,13 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
|
|||
s->get_bpp = vga_get_bpp;
|
||||
s->get_offsets = vga_get_offsets;
|
||||
s->get_resolution = vga_get_resolution;
|
||||
graphic_console_init(s->ds, vga_update_display, vga_invalidate_display,
|
||||
vga_screen_dump, s);
|
||||
s->update = vga_update_display;
|
||||
s->invalidate = vga_invalidate_display;
|
||||
s->screen_dump = vga_screen_dump;
|
||||
}
|
||||
|
||||
/* used by both ISA and PCI */
|
||||
static void vga_init(VGAState *s)
|
||||
void vga_init(VGAState *s)
|
||||
{
|
||||
int vga_io_memory;
|
||||
|
||||
|
@ -1856,6 +1857,8 @@ int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
|
|||
vga_common_init(s, ds, vga_ram_base, vga_ram_offset, vga_ram_size);
|
||||
vga_init(s);
|
||||
|
||||
graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump, s);
|
||||
|
||||
#ifdef CONFIG_BOCHS_VBE
|
||||
/* XXX: use optimized standard vga accesses */
|
||||
cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
|
||||
|
@ -1881,6 +1884,9 @@ int pci_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
|
|||
|
||||
vga_common_init(s, ds, vga_ram_base, vga_ram_offset, vga_ram_size);
|
||||
vga_init(s);
|
||||
|
||||
graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump, s);
|
||||
|
||||
s->pci_dev = &d->dev;
|
||||
|
||||
pci_conf = d->dev.config;
|
||||
|
|
|
@ -134,6 +134,9 @@
|
|||
uint32_t cursor_offset; \
|
||||
unsigned int (*rgb_to_pixel)(unsigned int r, \
|
||||
unsigned int g, unsigned b); \
|
||||
vga_hw_update_ptr update; \
|
||||
vga_hw_invalidate_ptr invalidate; \
|
||||
vga_hw_screen_dump_ptr screen_dump; \
|
||||
/* hardware mouse cursor support */ \
|
||||
uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \
|
||||
void (*cursor_invalidate)(struct VGAState *s); \
|
||||
|
@ -157,6 +160,7 @@ static inline int c6_to_8(int v)
|
|||
|
||||
void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
|
||||
unsigned long vga_ram_offset, int vga_ram_size);
|
||||
void vga_init(VGAState *s);
|
||||
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
|
||||
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
|
||||
void vga_invalidate_scanlines(VGAState *s, int y1, int y2);
|
||||
|
|
1187
hw/vmware_vga.c
Normal file
1187
hw/vmware_vga.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue