// Search the table for address range
while (pTable->size != 0) {
if (
pa >= pTable->PA &&
pa <= (pTable->PA + (pTable->size << 20) - 1)
) break; // match found
pTable++;
}
// If address table entry is valid compute the VA
if (pTable->size != 0) {
va = (VOID *)(pTable->CA + (pa - pTable->PA));
// If VA is uncached, set the uncached bit
if (!cached) (UINT32)va |= OAL_MEMORY_CACHE_BIT;
}