Hi all, i have a small problem. I have a kernel with software taskswitching, and vm86. now is my question.
I can do real mode ints, like int 0x10, etc. but I start those int with a funcion that create a vm86 process. and when I finish using int 0x10 for example, that function call int 0x20, that is a simple function that remove that process from my scheduler.
anyone knows how to make that better?
like when using a int 0x20 " good exit " it turns that task to protected mode task and then exit by him self ?
vm86 task
Re: vm86 task
Only one thread should use the BIOS simulatenously. Therefore, you might as well have a dedicated BIOS process where the low virtual addresses are identity mapped (for example, you could have all BIOS calls be executed in the system process context) and access to the BIOS should be protected by a critical section. When the V86 mode call is finished, the system can remove the V86 return address, stack pointer and segment registers from the stack, restore the ESP0 field in the TSS to what it was before the V86 call was issued and return to the caller. If the thread was moved to the system process (to call the BIOS), the thread should also be moved back to the original process.