int retval = armv4_5_mmu_translate_va(target, &arm720t->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret);
if (retval != ERROR_OK)
return retval;
- if (type == -1)
- {
- return ret;
- }
*physical = ret;
return ERROR_OK;
}
&arm920t->armv4_5_mmu, virt, &type, &cb, &domain, &ap, &ret);
if (retval != ERROR_OK)
return retval;
- if (type == -1)
- {
- return ret;
- }
*phys = ret;
return ERROR_OK;
}
address, &type, &cb, &domain, &ap, &pa);
if (retval != ERROR_OK)
return retval;
- if (type == -1)
- return pa;
if (arm920t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled)
{
int retval = armv4_5_mmu_translate_va(target, &arm926ejs->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret);
if (retval != ERROR_OK)
return retval;
- if (type == -1)
- {
- return ret;
- }
*physical = ret;
return ERROR_OK;
}
if ((first_lvl_descriptor & 0x3) == 0)
{
- *type = -1;
LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
if (!armv4_5_mmu->has_tiny_pages && ((first_lvl_descriptor & 0x3) == 3))
{
- *type = -1;
LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
if ((second_lvl_descriptor & 0x3) == 0)
{
- *type = -1;
LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
}
/* should not happen */
- *type = -1;
LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
/* Reset the flag. We don't want someone else to use it by error */
cortex_a8->current_address_mode = ARM_MODE_ANY;
- if (type == -1)
- {
- return ret;
- }
*phys = ret;
return ERROR_OK;
}
int retval = armv4_5_mmu_translate_va(target, &xscale->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret);
if (retval != ERROR_OK)
return retval;
- if (type == -1)
- {
- return ret;
- }
*physical = ret;
return ERROR_OK;
}