v86 question - invoking BIOS
Posted: Sun Nov 25, 2007 2:43 am
Hey everyone,
I cannot seem to find out what the problem is here, or where to begin looking anymore on this problem, and hope someone else may have some ideas at what the problem may be.
I am setting up v86 mode in my bootloader. This is the v86 task:
Okay... The important line is INT 0x10. This is to be invoking BIOS INT 0x10 through my GPF handler.
The above v86 task is executing at ring 3. When the INT 0x10 instruction is executed, the processor executes my GPF handler nicely, and enters back in pmode.
...Except still at ring 3.
What can cause this? Why would the processor execute my pmode GPF handler at ring 3 still? Is it not supposed to switch back to ring 0?
---
Now for problem number 2...
I cannot seem to be able to execute the BIOS interrupt handler. I have the IVT index, but cannot execute it from that location. Anything I try, it will either GPF, Double fault, or triple fault. Other times, of course, jumping off to la-la land.
It never attempts to execute the handler.
I have checked with the intel manuals. Assuming the first problem is an actual problem, I wonder if these two are linked.
As I have tried so many things to invoke the BIOS interrupt through the IVT, I have had countless of different Bochs log errors. As such, it would not be of much use here to post it. I am basically looking for either an example, stack frame setup, anything that can help in invoking the BIOS interrupt from the GPF handler / v86 monitor.
I am looking for more suggestions here on possible places to look that may cause these problems. I am all out of ideas :/
Thanks for any suggestions.
I cannot seem to find out what the problem is here, or where to begin looking anymore on this problem, and hope someone else may have some ideas at what the problem may be.
I am setting up v86 mode in my bootloader. This is the v86 task:
Code: Select all
bits 16
V86_Mode:
sti
mov al, 'A'
mov ah, 0eh
int 10h ; print 'A'
int 0x80 ; terminate process-return to previous task
jmp $
The above v86 task is executing at ring 3. When the INT 0x10 instruction is executed, the processor executes my GPF handler nicely, and enters back in pmode.
...Except still at ring 3.
What can cause this? Why would the processor execute my pmode GPF handler at ring 3 still? Is it not supposed to switch back to ring 0?
---
Now for problem number 2...
I cannot seem to be able to execute the BIOS interrupt handler. I have the IVT index, but cannot execute it from that location. Anything I try, it will either GPF, Double fault, or triple fault. Other times, of course, jumping off to la-la land.
It never attempts to execute the handler.
I have checked with the intel manuals. Assuming the first problem is an actual problem, I wonder if these two are linked.
As I have tried so many things to invoke the BIOS interrupt through the IVT, I have had countless of different Bochs log errors. As such, it would not be of much use here to post it. I am basically looking for either an example, stack frame setup, anything that can help in invoking the BIOS interrupt from the GPF handler / v86 monitor.
I am looking for more suggestions here on possible places to look that may cause these problems. I am all out of ideas :/
Thanks for any suggestions.