*
* Similar to get_phys_addr, but for use by AccessType_AT, i.e.
* system instructions for address translation.
+ *
+ * Returns: false on translation failure, true on success.
*/
bool get_phys_addr_for_at(CPUARMState *env, vaddr address, unsigned prot_check,
ARMMMUIdx mmu_idx, ARMSecuritySpace space,
* check is handled or bypassed by .in_prot_check) and "memop = MO_8"
* bypasses any alignment check.
*/
- return !get_phys_addr_nogpc(env, &ptw, address,
+ return get_phys_addr_nogpc(env, &ptw, address,
MMU_DATA_LOAD, MO_8, result, fi);
}
bool format64 = false;
ARMMMUFaultInfo fi = {};
GetPhysAddrResult res = {};
- bool ret = get_phys_addr_for_at(env, value, prot_check,
- mmu_idx, ss, &res, &fi);
+ bool ok = get_phys_addr_for_at(env, value, prot_check,
+ mmu_idx, ss, &res, &fi);
/*
* ATS operations only do S1 or S1+S2 translations, so we never
* have to deal with the ARMCacheAttrs format for S2 only.
* (Note that res fields are only valid on ptw success.)
*/
- assert(ret || !res.cacheattrs.is_s2_format);
+ assert(!ok || !res.cacheattrs.is_s2_format);
- if (ret) {
+ if (!ok) {
/*
* Some kinds of translation fault must cause exceptions rather
* than being reported in the PAR.
if (format64) {
/* Create a 64-bit PAR */
par64 = (1 << 11); /* LPAE bit always set */
- if (!ret) {
+ if (ok) {
par64 |= res.f.phys_addr & ~0xfffULL;
if (!res.f.attrs.secure) {
par64 |= (1 << 9); /* NS */
* translation table format (with WnR always clear).
* Convert it to a 32-bit PAR.
*/
- if (!ret) {
+ if (ok) {
/* We do not set any attribute bits in the PAR */
if (res.f.lg_page_size == 24
&& arm_feature(env, ARM_FEATURE_V7)) {