Page 1 of 1
VMWare SVGA example
Posted: Sun Jan 08, 2023 3:51 pm
by AlectronikLabs
I am looking for a way to switch to a graphic mode with linear framebuffer without using VM86 or having the bootloader to switch vesa modes. Thus I thought of writing a simple driver for one of QEmu's supported graphic cards, it doesn't matter which one but my first thought was vmware, since this is made for emulation.
Do you know of any project which has an already implemented driver for vga vmware?
Many thanks in advance!
Re: VMWare SVGA example
Posted: Sun Jan 08, 2023 8:17 pm
by klange
The default video 'hardware' in QEMU is the Bochs "BGA" - you should look at that first, before VMware SVGA, as it's simpler and will get you working video in QEMU, Bochs, and VirtualBox (where it is also the default). We have an article on the wiki that should help:
https://wiki.osdev.org/BGA (Though do note that there are two different interfaces, one over MMIO and one over port I/O; you should do the port I/O version first, the MMIO version is a QEMU extension that allows it provide the same interface on architectures that do not have port I/O).
Once you have that working, the basic modesetting for VMware SVGA works in much the same way, just with different MMIO addresses.
I have drivers for all of these:
VMware,
Bochs port i/o, and
QEMU's MMIO interface.
Re: VMWare SVGA example
Posted: Thu Jan 12, 2023 11:38 am
by AlectronikLabs
Thanks @klange, this is exactly what I was looking for. Yeah, then Bochs VBE comes first, as soon as I have implemented PCI (and fixed some nasty GDT bug).