1

Short Version

What does the error ERROR_IOPL_NOT_ENABLED mean?

Background

Users are getting the error:

enter image description here

The operating system is not presently configured to run this application.

They're getting on from Microsoft Office. They're getting it from Microsoft Skype. They're getting it on Windows 8, 8.1, and 10.

This is a reference to the standard Windows Error Code:

ERROR_IOPL_NOT_ENABLED (197)

The operating system is not presently configured to run this application.

Which you can find in the SDK:

WinError.h:

//
// MessageId: ERROR_IOPL_NOT_ENABLED
//
// MessageText:
//
// The operating system is not presently configured to run this application.
//
#define ERROR_IOPL_NOT_ENABLED           197L

Which begs the questions:

  • What is an IOPL?
  • Why would it not be enabled?
  • How do i detect that it is not enabled?
  • How could it have been disabled?
  • How would i enable it?
  • Why would an application need IOPL enabled; and why does it mean operating system not configured to run this application?
  • What configuration would an application possibly need to be "configured" to run the application?

I/O Protection Ring?

The closest thing i can find in computing for "IOPL" is I/O Protection Ring:

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 Current Privilege Level (CPL) (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.

╔════╤════╤═══════╤════╤════╤════╤════╤════╤════╤════╤════╤════╤════╤════╤════╗
║  0 │ NT │  IOPL │ OF │ DF │ IF │ TF │ SF │ ZF │ -- │ AF │ -- │ PF │  1 │ CF ║
╚════╧════╧═══════╧════╧════╧════╧════╧════╧════╧════╧════╧════╧════╧════╧════╝
  15   14   13 12   11   10    9    8    7    6    5    4    3    2    1    0 
             ^ ^
             | |
       these two bits

There's no way a user-mode application (e.g. Microsoft Word) would be trying to directly access hardware.

And there's no way a Windows user-mode application is operating on a CPU on anything other than protected or long modes.

So what does the error:

The operating system is not presently configured to run this application.

really mean?

Bonus Reading

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • 1
    No kernel `NTSTATUS` value maps to `ERROR_IOPL_NOT_ENABLED`. Moreover, most exception codes map to themselves, i.e. `RtlNtStatusToDosError(exception) == exception`. For example, relevant here, the exception status value `STATUS_PRIVILEGED_INSTRUCTION` (0xC0000096) maps to itself. Possibly these cases reported by users involve an exception handler that manually maps the exception to `ERROR_IOPL_NOT_ENABLED`, but I'd also consider the possibility that a misbehaving program may fail with a bogus error code. – Eryk Sun Feb 20 '18 at 20:03

0 Answers0