Re: Setting IOPL of a Procedure



"mybwpp@xxxxxxxxxxxxxx" <spamtrap@xxxxxxxxxx> wrote in message
news:f5486081-0018-4f32-b9fd-105e624d07d8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
According to 80386 Programmers Reference Manual:

"To use sensitive instructions (IN, OUT etc.), a procedure must
execute at a privilege level at least as privileged as that specified
by the IOPL (CPL <= IOPL). Any attempt by a less privileged procedure
to use a sensitive instruction results in a general protection
exception"

This will either be left to generate a visible exception, or it will be
trapped by the operating system/evironment and the IN or OUT instruction
will be emulated or even re-executed (at a higher IOPL level by the O/S).

The question is who sets the IOPL of a procedure at startup. Which
part of OS assigns IOPL to a procedure?

Generally, the IOPL is set for the entire application, not for each
individual procedure.

--
Jay

Jason Burgon - author of Graphic Vision
http://homepage.ntlworld.com/gvision

.



Relevant Pages

  • Setting IOPL of a Procedure
    ... "To use sensitive instructions, a procedure must ... execute at a privilege level at least as privileged as that specified ... by the IOPL. ...
    (comp.lang.asm.x86)
  • Re: iopl
    ... The variables that it sets are CPU configuration variables. ... couldn't find the code that checks those variables, like iopl variable ... but they don't if used with iopl level 3. ... privilege level) is less than the IOPL. ...
    (comp.os.linux.development.system)