amd64_iopl - change the amd64 I/O privilege level
#include <sys/types.h>
#include <machine/sysarch.h>
int
amd64_iopl(int iopl);
amd64_iopl() sets the amd64 I/O privilege level to the value
specified by
iopl. This call is restricted to the superuser.
Note: Code using the amd64_iopl() function must be compiled
using
-lamd64.
Upon successful completion, amd64_iopl() returns 0. Otherwise, a value
of -1 is returned and the global variable errno is set to
indicate the
error.
amd64_iopl() will fail if:
[EPERM] The caller was not the superuser.
amd64_get_ioperm(2), amd64_set_ioperm(2)
Intel, AMD64 Microprocessor Programmer's Reference Manual.
You can really hose your machine if you enable user-level
I/O and write
to hardware ports without care.
OpenBSD 3.6 October 14, 1995
[ Back ] |