I have coded a working scheduler and a __CreateProcess function. The __CreateProcess creates the required segments for a process like CS/DS/ES and etc with the DPL of 3 (User level). Now I want to know how I should do the context switching without getting this error from Bochs:

00003082754e check_cs: non-conforming code seg descriptor dpl != cpl

Are there any special tricks to be pulled off while switching from CPL 0 to CPL 3? Any suggestions? Thanks in advance.
Posted on 2007-04-26 01:23:01 by XCHG
pushing stuff to the stack and doing an iretd?
Posted on 2007-04-26 08:04:24 by f0dder
Oh yes f0dder. Thank you. I fixed that problem.
Posted on 2007-04-27 02:44:07 by XCHG