I finally wrote a v86 monitor for my kernel.
When I try to execute INT 0x10 (AX=0x4F00) to get VESA informations, i first get a Page Fault on C000:012D (PUSHF) and my monitor does the job. Then I get a second pagefault on C000:012E (CMP AL, 0F) with opcode 0x80 which isn't handled by my monitor. Why does a cmp instruction need the monitor?
Too many Virtual 8086 exceptions
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
Too many Virtual 8086 exceptions
Please, correct my English...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
Re: Too many Virtual 8086 exceptions
Hi,
Maybe the page fault at C000:012D (PUSHF) is because the page isn't mapped into the address space properly, and for some unknown reason your page fault handler emulates the instruction that it thinks is there (and increases IP), and the page fault at C000:012E (CMP AL, 0F) occurs because the page still isn't mapped into the address space properly?
Note: The PUSHF will cause a page fault if the page at 0x000C0000 isn't present, isn't readable, or isn't executable. The PUSHF will also cause a page fault if stack is messed up (SS:SP points to a page that isn't present or isn't writable). The PUSHF instruction *should* cause a general protection fault (but you're saying it causes a page fault instead).
Cheers,
Brendan
I'm guessing...AlfaOmega08 wrote:I finally wrote a v86 monitor for my kernel.
When I try to execute INT 0x10 (AX=0x4F00) to get VESA informations, i first get a Page Fault on C000:012D (PUSHF) and my monitor does the job. Then I get a second pagefault on C000:012E (CMP AL, 0F) with opcode 0x80 which isn't handled by my monitor. Why does a cmp instruction need the monitor?
Maybe the page fault at C000:012D (PUSHF) is because the page isn't mapped into the address space properly, and for some unknown reason your page fault handler emulates the instruction that it thinks is there (and increases IP), and the page fault at C000:012E (CMP AL, 0F) occurs because the page still isn't mapped into the address space properly?
Note: The PUSHF will cause a page fault if the page at 0x000C0000 isn't present, isn't readable, or isn't executable. The PUSHF will also cause a page fault if stack is messed up (SS:SP points to a page that isn't present or isn't writable). The PUSHF instruction *should* cause a general protection fault (but you're saying it causes a page fault instead).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Too many Virtual 8086 exceptions
The only exception your v8086 mode monitor should be using to do 'its job' is the GPF exception. Other exceptions are actual error conditions and should be handled as such.i first get a Page Fault on C000:012D (PUSHF) and my monitor does the job