Page 1 of 1

Virtual-8086-Mode Extensions

Posted: Sat Nov 19, 2005 8:11 am
by bluecode
hi,

the section about virtual-8086-mode extension in the intel manual is a bit confusing to my. I hope you can clarify this a bit.
I've enabled vme already (bit 0 of cr4) and I've set up my v8086 task correctly. It is runing so far. Then I have added a Interrupt Redirection Map in the TSS and set the bit for interrupt 0xFF. When I'm calling this interrupt from v8086 then it raises a general protectetion fault. Is this the behaviour normal? I thought it would call the protected mode interrupt 0xFF, or not?
To verify that I set the right bit in the TSS, I cleared it and the v8086 interrupt is correctly executed.

Thanks in Advance!

Re:Virtual-8086-Mode Extensions

Posted: Sat Nov 19, 2005 11:28 am
by Pype.Clicker
raising a GPF when "int nn" is invoked in v86 mode is normal. What the interrupt redirection map allows is to "bypass" that GPF and directly invoke "int nn" _in the realmode interrupt vector table_ ... so if you set the 16th bit of the table, "int 0x10" will happily invoke VGA BIOS interrupt without going through your virtual mode monitor.

Re:Virtual-8086-Mode Extensions

Posted: Sat Nov 19, 2005 12:23 pm
by bluecode
Pype.Clicker wrote:... so if you set the 16th bit of the table, "int 0x10" will happily invoke VGA BIOS interrupt without going through your virtual mode monitor.
according to the Intel Manual it should be cleared, shouldn't it? ;) :
"When a bit in this bit map is set, it indicates that the associated software interrupt (interrupt generated with an INT n instruction) should be handled through the protected-mode IDT and interrupt and exception handlers. When a bit in this bit map is clear, the processor redirects the associated software interrupt back to the interrupt table in the 8086 program (located at linear address 0 in the program?s address space)."

Thanks pype. I got that now. :)