Annoyances in Task Switching 
Author Message
 Annoyances in Task Switching

I have been experimenting with Protected Mode for a month or two now, and
there is one thing that is really bugging me. I am trying to get code to
execute in a processor ring other than 0, and it doesn't work. Whenever I
make the 'iret' call to drop down to a lower ring I either get a Page
Fault, or else the computer simply resets. Does anyone know where I can get
some docs on doing this properly. I have some of the Intel ones, but they
aren't especially helpful as they only say things like "you can not call
Ring 3 from Ring 0". Any suggestions welcomed
--
Graham Cox

Remove extra lines to mail
ICQ# 24532124
PGP Public Thingy available upon request, or from keyserver.

If this e-mail address is used in any manner that does not have
my personal authorization then I will be writing to the relavent
authorities with enough complaints to get you in serious trouble.



Sat, 14 Sep 2002 03:00:00 GMT  
 Annoyances in Task Switching
There is some code to do this in the Enter Protected Mode
(EPM) example program in with 386SWAT.

http://www.sudleyplace.com/swat/swat.htm

Essentially, setup the stack for a ring transition (SS, ESP,
EFL, CS, and EIP) with the selectors all at the same RPL
(Requestor Privilege Level).  Also, be sure that the DPL (the
bits in the GDT/LDT) of at least the stack selecor is the same
as its RPL.

Quote:

> I have been experimenting with Protected Mode for a month or two now, and
> there is one thing that is really bugging me. I am trying to get code to
> execute in a processor ring other than 0, and it doesn't work. Whenever I
> make the 'iret' call to drop down to a lower ring I either get a Page
> Fault, or else the computer simply resets. Does anyone know where I can get
> some docs on doing this properly. I have some of the Intel ones, but they
> aren't especially helpful as they only say things like "you can not call
> Ring 3 from Ring 0". Any suggestions welcomed
> --
> Graham Cox

> Remove extra lines to mail
> ICQ# 24532124
> PGP Public Thingy available upon request, or from keyserver.

> If this e-mail address is used in any manner that does not have
> my personal authorization then I will be writing to the relavent
> authorities with enough complaints to get you in serious trouble.

--
_________________________________________


I've been getting a lot of junk e-mail lately,
so to reply to me directly, delete "despam".



Thu, 19 Sep 2002 04:00:00 GMT  
 Annoyances in Task Switching
Nightcap came into the domain commonly known as alt.lang.asm on the date of 30
Mar 2000 and loudly proclaimed

Quote:
>X-No-Archive: Yes

>> I have been experimenting with Protected Mode for a month or two now, and
>> there is one thing that is really bugging me. I am trying to get code to
>> execute in a processor ring other than 0, and it doesn't work. Whenever I
>> make the 'iret' call to drop down to a lower ring...
>? You make an 'iret' call to do what? "Iret" is a return from interrupt. Would
you share a little
>more about what you're doing and what you're trying to achieve?

Sorry. I;m just playing around really, and all the docs I've got on the subject
say that to get from ring 0 to ring 3, or any other ring for that matter, needs
to be done by setting up a stack and then performing an IRETD command. As it is
I've got it working now, but that is what I was trying to achieve.

--
Graham Cox

Remove extra lines to mail
ICQ# 24532124
PGP Public Thingy available upon request, or from keyserver.

If this e-mail address is used in any manner that does not have
my personal authorization then I will be writing to the relavent
authorities with enough complaints to get you in serious trouble.



Sat, 21 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Fossil Q./task switching

2. CW 2003: Task Switching?

3. Clipper, Win95, Novell network and task switching

4. Analog output stops on task switch (bug?)

5. task-switching

6. Task switching problems!...

7. Task switching...

8. Page Fault in Task Switch

9. Task Switch: code examples needed...

10. Task vs. Mode Switching

11. Timer-triggered task switching

12. task switching examples

 

 
Powered by phpBB® Forum Software