Software-tasking virtual8086 mode.
Posted: Tue Feb 05, 2008 1:24 pm
I posted someting about this in osdevelopment forum, but i got no replies, and as i've done some research and made some (fingers x-ed) progress, feel i should create a new topic and ask some more refined questions.
Ok...
Well im using tasking based largely on JamesM's tutorial, and i have a seperate stack for my userland tasks, and one for my kernel.
In v86 tasks i understand the stack must be below 1mb, as must the task.
This can be easily acheived, as i can create a new stack, and switch to it with fair ease.
I must then set the EFLAGS.VM register to 1, this is apparently easiest when returning from an interrupt.
My approach to this is to have a very simple executable loaded into my RamFS that simple calls a syscall which will initiate the v86 task. The syscall could get the task information from a extern task_t structure, update the EFLAGS and then switch to the now virtual8086 task.
Is there anything else i need to know? or have i got something wrong.
i can't find anything on v86 and software-task switching, and so that is based from the intel manuals and http://osdev.berlios.de/v86.html
If anybody has got it working and wouldn't mind giving me a pointer or two, or perhaps a quick IM/IRC/email chat, it would be much appreciated.
ciao, lukem95
Ok...
Well im using tasking based largely on JamesM's tutorial, and i have a seperate stack for my userland tasks, and one for my kernel.
In v86 tasks i understand the stack must be below 1mb, as must the task.
This can be easily acheived, as i can create a new stack, and switch to it with fair ease.
I must then set the EFLAGS.VM register to 1, this is apparently easiest when returning from an interrupt.
My approach to this is to have a very simple executable loaded into my RamFS that simple calls a syscall which will initiate the v86 task. The syscall could get the task information from a extern task_t structure, update the EFLAGS and then switch to the now virtual8086 task.
Is there anything else i need to know? or have i got something wrong.
i can't find anything on v86 and software-task switching, and so that is based from the intel manuals and http://osdev.berlios.de/v86.html
If anybody has got it working and wouldn't mind giving me a pointer or two, or perhaps a quick IM/IRC/email chat, it would be much appreciated.
ciao, lukem95