void SBA_INLINE sba_io_pdir_entry (u64 * pdir_ptr, space_t sid, unsigned long vba);
SBA Mapping Routine
Given a virtual address (vba, arg2) and space id, (sid, arg1) sba_io_pdir_entry 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):
0 19 51 55 63 +-+---------------------+----------------------------------+----+--------+ |V| U | PPN[43:12] | U | VI | +-+---------------------+----------------------------------+----+--------+
V == Valid Bit U == Unused PPN == Physical Page Number VI == Virtual Index (aka Coherent Index)
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
19 of the value returned by LCI.
We need to pre-swap the bytes since PCX-W is Big Endian.