OpenBSD manual page server

Manual Page Search Parameters

LIBALPHA(2) System Calls Manual (alpha) LIBALPHA(2)

dense_base, inb, inl, inw, ioperm, map_memory, outb, outl, outw, readb, readl, readw, unmap_memory, writeb, writel, writewAlpha 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 () functions return data read from the specified I/O port.

The () functions write data to the specified I/O port.

() enables access to the specified port numbers if on is TRUE and disables access if on is FALSE.

The () function allows a user program to map part of a device memory.

The () function unmaps memory that was previously mapped by map_memory().

The () functions read data from device memory previously mapped by map_memory().

The () functions write data to the device memory previously mapped by map_memory().

: 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.

December 24, 2011 OpenBSD-5.9