Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm trying to get real mode tasks to work in my OS. I understand that I need to have a handler for GPF (?) to handle priveleged instructions in the task, but for now the task is just an infinite loop in 16-bit mode.
have you provided a correct CS and EIP in the IDT for all exceptions?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
pcmattman wrote:Do I need to make a new IDT for V8086 tasks? I thought I had the right CS:EIP for all the exceptions.
It depends on how you're taking care of interrupts (for example looping interrupts back to V86 task) - but in most cases it's not nessecery.
I can see that you're not using paging. Does it mean that all your V86 tasks are working in first MB?
Hmmmm..... For me it looks like after entering V86 mode CS and EIP are loaded with wrong values from TSS (values not initialized?). V86 is trying to execute some random commands (last one is "lock push bx"). After that you're getting GPF and TS.
Maybe you're overwritting some system structures (entries from IDT or GDT) for example when you're loading your v86 task into memory ?
Are you using task gate descriptors in IDT, because your OS behave like it could'nt find TSS for task gate from IDT in GDT.