Yet another vm86 thread: vm86 + paging help

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.
Post Reply
User avatar
omin0us
Member
Member
Posts: 49
Joined: Tue Oct 17, 2006 6:53 pm
Location: Los Angeles, CA
Contact:

Yet another vm86 thread: vm86 + paging help

Post by omin0us »

Ok, i've been trying to get this for a while. I have my 16bit process setup with the correct eflags for vm86. and the extra segments and all that jazz, and when it tries to execute the 16bit instruction, it page faults. :-/

cant figure out why. I just have a task that does jmp $ to loop endlessly
and i can see it get to that instruction in the bochs debugger, but then faults when it executes it. any clues on this? anything i might need to know about vm86 + paging?
http://ominos.sourceforge.net - my kernel
#ominos @ irc.freenode.net
http://dtors.ath.cx - my blog
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Vm86 tasks run at CP3. You need to make sure that the pages that the VM86 task are in are set to user level.
User avatar
astrocrep
Member
Member
Posts: 127
Joined: Sat Apr 21, 2007 7:21 pm

Post by astrocrep »

I believe you can run the task as cpl0 too...

I plan on doing it that way since my vm86 will just be used for video mode, I am not going to seperate it from the kernel.

-Rich
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

V8086 tasks are by definition run in ring 3.
"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 ]
Post Reply