target/arm: Fix TLBIRange.base for 16k and 64k pages
The shift of the BaseADDR field depends on the translation granule in use. Fixes: 84940ed8255 ("target/arm: Add support for FEAT_TLBIRANGE") Reported-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220301215958.157011-14-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ab1cdb47bf
commit
d976de218c
@ -4538,10 +4538,11 @@ static TLBIRange tlbi_aa64_get_range(CPUARMState *env, ARMMMUIdx mmuidx,
|
||||
ret.length = (num + 1) << (exponent + page_shift);
|
||||
|
||||
if (regime_has_2_ranges(mmuidx)) {
|
||||
ret.base = sextract64(value, 0, 37) << TARGET_PAGE_BITS;
|
||||
ret.base = sextract64(value, 0, 37);
|
||||
} else {
|
||||
ret.base = extract64(value, 0, 37) << TARGET_PAGE_BITS;
|
||||
ret.base = extract64(value, 0, 37);
|
||||
}
|
||||
ret.base <<= page_shift;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user