(Solved) v8086 task switching problems
Posted: Thu Mar 02, 2017 2:28 am
Hello, I have a simple software multitasking implementation.
As ESP only gets popped off by iret if privilege level changes, I used the easy way, I just forgot about Ring0 tasks, just used Ring3 tasks. And I want to improve it, by adding support to switching reliably between Ring3 and Ring0 tasks. Then my drivers can run in Ring0 tasks, while Virtual 8086 mode and user tasks can run in Ring3 tasks.
The problem is the ESP. I think I need to handle the case the current task and the next task is a Ring0 task.
How can I switch reliably between Ring3 and Ring0 tasks?
I got really confused and I can't think anymore. Maybe I should have a rest a bit.
Thanks in advance.
Edit:
That was a question about switching between ring0 and ring3, now it is for v8086 tasks, because I didn't want to open a new thread for it. Because the thread was short, and opening a new thread wouldn't be a good idea as it blocks another questions.
As ESP only gets popped off by iret if privilege level changes, I used the easy way, I just forgot about Ring0 tasks, just used Ring3 tasks. And I want to improve it, by adding support to switching reliably between Ring3 and Ring0 tasks. Then my drivers can run in Ring0 tasks, while Virtual 8086 mode and user tasks can run in Ring3 tasks.
The problem is the ESP. I think I need to handle the case the current task and the next task is a Ring0 task.
How can I switch reliably between Ring3 and Ring0 tasks?
I got really confused and I can't think anymore. Maybe I should have a rest a bit.
Thanks in advance.
Edit:
That was a question about switching between ring0 and ring3, now it is for v8086 tasks, because I didn't want to open a new thread for it. Because the thread was short, and opening a new thread wouldn't be a good idea as it blocks another questions.