amd64_set_ioperm man page on OpenBSD

Man page or keyword search:  
man Server   11362 pages
apropos Keyword Search (all sections)
Output format
OpenBSD logo
[printable version]

AMD64_GET_IOPERM(2)   OpenBSD Programmer's Manual (AMD64)  AMD64_GET_IOPERM(2)

     amd64_get_ioperm, amd64_set_ioperm - manage amd64 per-process I/O
     permission bitmap

     #include <sys/types.h>
     #include <machine/sysarch.h>

     amd64_get_ioperm(u_long *iomap);

     amd64_set_ioperm(u_long *iomap);

     amd64_get_ioperm() copies the current I/O permission bitmap into the
     memory referenced by iomap.

     amd64_set_ioperm() sets the I/O permission bitmap from the data pointed
     to by iomap.  This call is restricted to the superuser.

     The permission bitmap contains 1024 bits in 32 longwords.	If bit n is
     clear in the bitmap, then access is granted to I/O port n.	 If bit n is
     set in the bitmap, then an attempt to access I/O port n results in
     delivery of a SIGBUS signal unless the process's I/O permission level
     would grant I/O access.

     Note: Code using the amd64_get_ioperm() and amd64_set_ioperm() functions
     must be compiled using -lamd64.

     Upon successful completion, amd64_get_ioperm() and amd64_set_ioperm()
     return 0.	Otherwise, a value of -1 is returned and the global variable
     errno is set to indicate the error.

     amd64_get_ioperm() and amd64_set_ioperm() will fail if:

     [EFAULT]  iomap points outside the process's allocated address space.

     [EPERM]   The caller was not the superuser.


     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.

     The bitmap should really cover 65536 bits, but that's just too big for
     allocation in a kernel structure.	If you need access to ports beyond
     1024, use amd64_iopl(2).

OpenBSD 4.9			 June 26, 2008			   OpenBSD 4.9

List of man pages available for OpenBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net