target/arm: Extract HA and HD in aa64_va_parameters
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20221024051851.3074715-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
980a68925c
commit
8973922783
@ -10470,7 +10470,7 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
|
|||||||
ARMMMUIdx mmu_idx, bool data)
|
ARMMMUIdx mmu_idx, bool data)
|
||||||
{
|
{
|
||||||
uint64_t tcr = regime_tcr(env, mmu_idx);
|
uint64_t tcr = regime_tcr(env, mmu_idx);
|
||||||
bool epd, hpd, tsz_oob, ds;
|
bool epd, hpd, tsz_oob, ds, ha, hd;
|
||||||
int select, tsz, tbi, max_tsz, min_tsz, ps, sh;
|
int select, tsz, tbi, max_tsz, min_tsz, ps, sh;
|
||||||
ARMGranuleSize gran;
|
ARMGranuleSize gran;
|
||||||
ARMCPU *cpu = env_archcpu(env);
|
ARMCPU *cpu = env_archcpu(env);
|
||||||
@ -10489,6 +10489,8 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
|
|||||||
epd = false;
|
epd = false;
|
||||||
sh = extract32(tcr, 12, 2);
|
sh = extract32(tcr, 12, 2);
|
||||||
ps = extract32(tcr, 16, 3);
|
ps = extract32(tcr, 16, 3);
|
||||||
|
ha = extract32(tcr, 21, 1) && cpu_isar_feature(aa64_hafs, cpu);
|
||||||
|
hd = extract32(tcr, 22, 1) && cpu_isar_feature(aa64_hdbs, cpu);
|
||||||
ds = extract64(tcr, 32, 1);
|
ds = extract64(tcr, 32, 1);
|
||||||
} else {
|
} else {
|
||||||
bool e0pd;
|
bool e0pd;
|
||||||
@ -10514,6 +10516,8 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
|
|||||||
e0pd = extract64(tcr, 56, 1);
|
e0pd = extract64(tcr, 56, 1);
|
||||||
}
|
}
|
||||||
ps = extract64(tcr, 32, 3);
|
ps = extract64(tcr, 32, 3);
|
||||||
|
ha = extract64(tcr, 39, 1) && cpu_isar_feature(aa64_hafs, cpu);
|
||||||
|
hd = extract64(tcr, 40, 1) && cpu_isar_feature(aa64_hdbs, cpu);
|
||||||
ds = extract64(tcr, 59, 1);
|
ds = extract64(tcr, 59, 1);
|
||||||
|
|
||||||
if (e0pd && cpu_isar_feature(aa64_e0pd, cpu) &&
|
if (e0pd && cpu_isar_feature(aa64_e0pd, cpu) &&
|
||||||
@ -10586,6 +10590,8 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
|
|||||||
.hpd = hpd,
|
.hpd = hpd,
|
||||||
.tsz_oob = tsz_oob,
|
.tsz_oob = tsz_oob,
|
||||||
.ds = ds,
|
.ds = ds,
|
||||||
|
.ha = ha,
|
||||||
|
.hd = ha && hd,
|
||||||
.gran = gran,
|
.gran = gran,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1065,6 +1065,8 @@ typedef struct ARMVAParameters {
|
|||||||
bool hpd : 1;
|
bool hpd : 1;
|
||||||
bool tsz_oob : 1; /* tsz has been clamped to legal range */
|
bool tsz_oob : 1; /* tsz has been clamped to legal range */
|
||||||
bool ds : 1;
|
bool ds : 1;
|
||||||
|
bool ha : 1;
|
||||||
|
bool hd : 1;
|
||||||
ARMGranuleSize gran : 2;
|
ARMGranuleSize gran : 2;
|
||||||
} ARMVAParameters;
|
} ARMVAParameters;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user