VMWare SVGA example

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AlectronikLabs
Posts: 3
Joined: Sun Jan 08, 2023 3:44 pm

VMWare SVGA example

Post 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!
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: VMWare SVGA example

Post 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.
AlectronikLabs
Posts: 3
Joined: Sun Jan 08, 2023 3:44 pm

Re: VMWare SVGA example

Post 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).
Post Reply