diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-01-21 10:23:12 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-01-21 10:38:54 +0000 |
commit | ba97be9f4a4ecaf16a1454dc669e5f3d935d3b63 (patch) | |
tree | 5b9c5244612270aa560c4ea827673c45c152eabd /target/arm/internals.h | |
parent | 64be86ab1b5ef10b660a4230ee7f27c0da499043 (diff) |
target/arm: Create ARMVAParameters and helpers
Split out functions to extract the virtual address parameters.
Let the functions choose T0 or T1 address space half, if present.
Extract (most of) the control bits that vary between EL or Tx.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20190108223129.5570-19-richard.henderson@linaro.org
[PMM: fixed minor checkpatch comment nits]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/internals.h')
-rw-r--r-- | target/arm/internals.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/arm/internals.h b/target/arm/internals.h index 248fdf7a3c..fdda2c866a 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -942,4 +942,18 @@ static inline ARMMMUIdx arm_stage1_mmu_idx(CPUARMState *env) ARMMMUIdx arm_stage1_mmu_idx(CPUARMState *env); #endif +/* + * Parameters of a given virtual address, as extracted from the + * translation control register (TCR) for a given regime. + */ +typedef struct ARMVAParameters { + unsigned tsz : 8; + unsigned select : 1; + bool tbi : 1; + bool epd : 1; + bool hpd : 1; + bool using16k : 1; + bool using64k : 1; +} ARMVAParameters; + #endif |