.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "SBA_IO_PDIR_ENTRY" "" "06 October 2005" "" ""
.SH NAME
sba_io_pdir_entry \- fill in one IO PDIR entry
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void SBA_INLINE sba_io_pdir_entry (u64 * \fIpdir_ptr\fB, space_t \fIsid\fB, unsigned long \fIvba\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIpdir_ptr\fB\fR
pointer to IO PDIR entry
.TP
\fB\fIsid\fB\fR
process Space ID
.TP
\fB\fIvba\fB\fR
Virtual CPU address of buffer to map
.SH "DESCRIPTION"
.PP
SBA Mapping Routine
.PP
Given a virtual address (vba, arg2) and space id, (sid, arg1)
\fBsba_io_pdir_entry\fR loads the I/O PDIR entry pointed to by
pdir_ptr (arg0). Each IO Pdir entry consists of 8 bytes as
shown below (MSB == bit 0):
.PP
0 19 51 55 63
+-+---------------------+----------------------------------+----+--------+
|V| U | PPN[43:12] | U | VI |
+-+---------------------+----------------------------------+----+--------+
.PP
V == Valid Bit
U == Unused
PPN == Physical Page Number
VI == Virtual Index (aka Coherent Index)
.PP
The physical address fields are filled with the results of the LPA
instruction. The virtual index field is filled with the results of
of the LCI (Load Coherence Index) instruction. The 8 bits used for
.SH "THE VIRTUAL INDEX ARE BITS 12"
.PP
19 of the value returned by LCI.
.PP
We need to pre-swap the bytes since PCX-W is Big Endian.