Initialize the VMware VGA console after vga_init
PATCH 1/1 Initialize the VMware VGA console after vga_init
Hi,
while trying the -vmwarevga switch I stumbled across this nifty problem: vga_common_init calls vga_reset, which memsets the whole VGAState to 0. Unfortunately the console initialization code is before that, so it gets overwritten by 0 which breaks later on.
To circumvent this I reordered the console initialization to after the vga_init. I am not 100% sure if that's correct, but it works so far. Please double-check if this is the right approach.
Alex
vmware_vga.c +5 -5
@@ -1123,16 +1123,16 @@vmsvga_reset (s); - s->console =graphic_console_init (ds, vmsvga_update_display, - vmsvga_invalidate_display, - vmsvga_screen_dump, - vmsvga_text_update, s); -#ifdef EMBED_STDVGA vga_common_init ((VGAState *) s, ds, vga_ram_base, vga_ram_offset, vga_ram_size);vga_init ((VGAState *) s);#endif + + s->console =graphic_console_init (ds, vmsvga_update_display, + vmsvga_invalidate_display, + vmsvga_screen_dump, + vmsvga_text_update, s); }static void pci_vmsvga_save (QEMUFile *f,void *opaque)
Quoted 7 lines · Alexander Graf
Hi,
while trying the -vmwarevga switch I stumbled across this nifty problem:
vga_common_initcallsvga_reset, which memsets the whole VGAState to 0. Unfortunately the console initialization code is before that, so it gets overwritten by 0 which breaks later on.
Quoted 7 lines
To circumvent this I reordered the console initialization to after the
vga_init. I am not 100% sure if that's correct, but it works so far. Please double-check if this is the right approach.Alex
Signed-off-by Alexander Graf <[email protected]>
Improvement here, as well.
Thanks!
Quoted 17 lines · Alexander Graf
Hi,
while trying the -vmwarevga switch I stumbled across this nifty problem:
vga_common_initcallsvga_reset, which memsets the whole VGAState to 0. Unfortunately the console initialization code is before that, so it gets overwritten by 0 which breaks later on.To circumvent this I reordered the console initialization to after the
vga_init. I am not 100% sure if that's correct, but it works so far. Please double-check if this is the right approach.Alex
Signed-off-by Alexander Graf <[email protected]>