Jump to content

IOPL

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Yuhong (talk | contribs) at 22:34, 15 April 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The IOPL (I/O Privilege level) flag is a flag found on all IA-32 compatible x86 CPUs. It occupies bits 12 and 13 in the FLAGS register. In protected mode and long mode, it shows the I/O privilege level of the current program or task. The CPL (Current Privilege Level) (CPL0, CPL1, CPL2, CPL3) of the task or program must be less than or equal to the IOPL in order for the task or program to access I/O ports.

The IOPL can be changed using POPF(D) and IRET(D) only when the current privilege level is Ring 0.

Besides IOPL, the I/O Port Permissions in the TSS also take part in determining the ability of a task to access an I/O port.

See also