.TH MAPIO() "" "" "Internal Kernel Routine"
.PC "Return global address"
.B "#include <sys/mmu.h>"
\fBint MAPIO(\fItable_address\^\fB, \fIoffset\^\fB)\fR
\fBSEG *\fItable_address\^\fB; int \fIoffset\^\fB;\fR
.PP
The macro
.B MAPIO()
passes
an absolute page-table address for a segment and an offset into the segment,
and returns the system global address of the desired location.
It is used when a region of memory is
available in a mapped segment, but could be unmapped later when it is needed.
A driver
uses the corresponding system global address range
to refer to the memory whether or not the segment that contains it is
mapped into virtual space.
.\".PP
.\"In a typical situation, you might have a
.\".DM
.\"	SEG * sp
.\".DE
.\".PP
.\"describing a segment, and an
.\".DM
.\"	int offset
.\".DE
.\".PP
.\"giving the offset into the segment where an interesting structure is located.
.\"Then, the call
.\".DM
.\"	MAPIO(sp->s_vmem, offset)
.\".DE
.\".PP
.\"gives the system global address of the structure.
.SH "See Also"
.B
internal kernel routines,
salloc()
.R
