IO Protection

When operating in Real Mode, any program can execute IO-oriented instructions and communicate directly with IO devices. For reasons described in the previous chapter, it can be dangerous to permit direct IO by tasks executing in a multitasking environment. To prevent this, the IA32 processors implement the IO privilege level (IOPL). By setting this two-bit field in the EFlags register image of a task's TSS to the appropriate privilege level (a value between zero and three), the OS can ensure that only tasks with a privilege level that meets or exceeds that indicated in the EFlags[IOPL] field are permitted to communicate directly with IO devices.

An IO access attempt by a task with a privilege level less than the IOPL results in ...

Get The Unabridged Pentium 4 IA32 Processor Genealogy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.