mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target/arm: Move arm_pamax out of line
We will shortly share parts of this function with other portions of address translation. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220301215958.157011-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ebf93ce7c0
commit
71a77257dd
2 changed files with 23 additions and 18 deletions
|
@ -243,24 +243,7 @@ static inline void update_spsel(CPUARMState *env, uint32_t imm)
|
|||
* Returns the implementation defined bit-width of physical addresses.
|
||||
* The ARMv8 reference manuals refer to this as PAMax().
|
||||
*/
|
||||
static inline unsigned int arm_pamax(ARMCPU *cpu)
|
||||
{
|
||||
static const unsigned int pamax_map[] = {
|
||||
[0] = 32,
|
||||
[1] = 36,
|
||||
[2] = 40,
|
||||
[3] = 42,
|
||||
[4] = 44,
|
||||
[5] = 48,
|
||||
};
|
||||
unsigned int parange =
|
||||
FIELD_EX64(cpu->isar.id_aa64mmfr0, ID_AA64MMFR0, PARANGE);
|
||||
|
||||
/* id_aa64mmfr0 is a read-only register so values outside of the
|
||||
* supported mappings can be considered an implementation error. */
|
||||
assert(parange < ARRAY_SIZE(pamax_map));
|
||||
return pamax_map[parange];
|
||||
}
|
||||
unsigned int arm_pamax(ARMCPU *cpu);
|
||||
|
||||
/* Return true if extended addresses are enabled.
|
||||
* This is always the case if our translation regime is 64 bit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue