Issues with VBE in VMWare
Posted: Fri Sep 05, 2014 1:44 am
Hey guys,
I've got my VBE driver working well in Bochs, QEMU and VirtualBox, but I still can't figure out whats wrong with it in VMWare. It already fails at loading the VBE info block, giving me an invalid instruction code. Kernel log:
My function for loading this isn't very complex. the given VbeInfoBlock* points to a struct in lower memory that has the appropriate size. It looks like this:
Did any of you have problems with VBE in VMWare? Is there anything special about VMWare that I have to consider?
Thank you in advance.
Greets, Max
I've got my VBE driver working well in Bochs, QEMU and VirtualBox, but I still can't figure out whats wrong with it in VMWare. It already fails at loading the VBE info block, giving me an invalid instruction code. Kernel log:
Code: Select all
[log] <1036> starting window manager
[log] <1036> setting video mode to 800x600x24
[log] <1036> VBE setting mode
[log] <1036> VBE sending request
[scheduler] waiting for all threads of process 1000 to exit: all finished
[log] <1036> VBE sent request
[log] <1036> VBE receiving with topic
[log] <1021> got lower memory block 32268
[exception] invalid operation code in task 1060 (process 1060)
eip: 0x00009130 eflags: 0x00030246
eax: 0x00008900 ebx: 0x00000000
ecx: 0x00000000 edx: 0x000076BE
esp: 0x00000FF6 state@: 0xFD005FA8
intr: 0x00000006 error: 0x00000000
[exception] process 1060 killed due to invalid operation code 0x000000FF
[log] <1021> could not load VBE info block
[log] <1021> vbe: unable to switch to video mode 800x600x24
[log] <1036> VBE received with topic
[log] <1036> VBE received false
[log] <1036> VBE driver reported that mode-set was not successful, quitting window manager
Code: Select all
// FP-Macros
#define FP_SEG(fp) (((FarPointer) fp) >> 16)
#define FP_OFF(fp) (((FarPointer) fp) & 0xffff)
#define LINEAR_TO_FP(linear) ((linear > 0x100000) ? 0 : ((((linear >> 4) & 0xFFFF) << 16) + (linear & 0xFL)))
...
bool loadVbeInfo(VbeInfoBlock* target) {
ghost::Virtual8086Registers out;
ghost::Virtual8086Registers in;
FarPointer vbeInfoBlockFp = LINEAR_TO_FP((uint32_t ) target);
in.ax = 0x4F00;
in.bx = 0;
in.cx = 0;
in.dx = 0;
in.es = FP_SEG(vbeInfoBlockFp);
in.di = FP_OFF(vbeInfoBlockFp);
in.ds = 0;
in.si = 0;
ghost::SystemCalls::callVm86(0x10, in, out);
return (out.ax == 0x4F);
}
Thank you in advance.
Greets, Max