change the i386 I/O privilege level
() sets the i386 I/O privilege level
to the value specified by iopl
This call may only be made by the superuser. Additionally, it is only permitted
when the securelevel(7)
less than or equal to 0 or the
sysctl has been set to
a non-zero value.
Code using the
() function must be compiled using
Upon successful completion,
returns 0. Otherwise, a value of -1 is returned and the global variable
is set to indicate the error.
() will fail if:
i386 Microprocessor Programmer's Reference
- The caller was not the superuser, or the securelevel is greater than zero
and machdep.allowaperture has not been
set to a non-zero value.
You can really hose your machine if you enable user-level I/O and write to
hardware ports without care.