dense_base, inb, inl, inw, ioperm, map_memory, outb, outl,
outw, readb,
readl, readw, unmap_memory, writeb, writel, writew - Alpha
devices I/O
ports and memory access functions
u_int64_t
dense_base(void);
u_int8_t
inb(u_int32_t port);
u_int32_t
inl(u_int32_t port);
u_int16_t
inw(u_int32_t port);
int
ioperm(unsigned long from, unsigned long num, int on);
void *
map_memory(u_int32_t address, u_int32_t size);
void
outb(u_int32_t port, u_int8_t val);
void
outl(u_int32_t port, u_int32_t val);
void
outw(u_int32_t port, u_int16_t val);
u_int8_t
readb(void *handle, u_int32_t offset);
u_int32_t
readl(void *handle, u_int32_t offset);
u_int16_t
readw(void *handle, u_int32_t offset);
void
unmap_memory(void *handle, u_int32_t size);
void
writeb(void *handle, u_int32_t offset, u_int8_t val);
void
writel(void *handle, u_int32_t offset, u_int32_t val);
void
writew(void *handle, u_int32_t offset, u_int16_t val);
The functions in libalpha give userland programs access to
the I/O ports
on the OpenBSD/alpha platform.
The in*() functions return data read from the specified I/O
port.
The out*() functions write data to the specified I/O port.
ioperm() enables access to the specified port numbers if on
is TRUE and
disables access if on is FALSE.
The map_memory() function allows a user program to map part
of a device
memory.
The unmap_memory() function unmaps memory that was previously mapped by
map_memory().
The read*() functions read data from device memory previously mapped by
map_memory().
The write*() functions write data to the device memory previously mapped
by map_memory().
Note: Code using these functions must be compiled using
-lalpha.
These functions originally appeared in FreeBSD.
Only BWX bus access method is supported for now. Machines
requiring swiz
type access are not supported.
Root credentials are needed to use these functions.
OpenBSD 3.6 July 6, 2002
[ Back ] |