Yep... call gates and some other indirect ways.
And, sorry... I've got a little confused here...
You cannot directly jump/call but, of course, ring0 can access data from less privileged "segments".
Since obviously Intel intended it to be possible to enter ring3 mode (or any mode higher than ring0 for that matter), they must have put in a mechanism designed for that purpose. I'm just trying to figure out what Intel's intended way to get to ring3 is. Do you need to go up a series of steps from ring0 through rings 1 and 2, to get to ring3? Do you need to be in a ring0 privilege mode segment first to enter ring3? Or can you just go straight from real mode to protected mode ring3?
I'm considering trying to use a call-gate to far call from a ring0 segment into a ring3 segment. I just need to know a few things. There are several places that privilege level comes in.
First is the fact that the initial code is in ring0 (CPL 0, actually 16bit-real mode, not even protected mode at this point).
Second is the requested privilege level used by the segment selector in the far call to the call-gate (what should this RPL be?).
Third is the DPL of the call-gate descriptor itself (what should this DPL be?).
Fourth is the requested privilege level used by the segment selector field in call-gate descriptor itself (what should this RPL be?).
Fifth is the DPL of the destination code segment (DPL 3).
So as you can see, I have 3 unknown settings here (the second, third, and fourth places that privilege levels are used). And if ANY of them are not setup correctly, it's going to generate an error. And to add even more complexity to this, there's also the issue of setting the code conforming bit properly in the destination ring3 code segment. Does this conforming bit in the destination code segment need to be 1 or 0 when using a call-gate in this manner?
And yet one other thing. Do I need to first get into protected mode before doing this call-gate thing? If so, what should the DPL of that initial protected mode segment be? And what RPL should I use for the fall call or jump into this initial protected mode segment?
I've been consistently getting privilege level errors when trying to do this. I've already tried several combinations, with no luck. So I need some bigtime help with this.