diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-05-16 16:16:04 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-06-06 13:56:18 +0000 |
commit | 072f325b2b5686d2a5b19f17f808810d5afd1944 (patch) | |
tree | 374458b24bbb997408a834828b5a92bc848a30f4 /src/arch/arm/tlb.hh | |
parent | 7f82aa3d60a1ca0f0b35435d42f875ff1f1bfe0b (diff) | |
download | gem5-072f325b2b5686d2a5b19f17f808810d5afd1944.tar.xz |
arch-arm: Respect EL from translation type
There are cases where instructions request translations in the context
of a lower EL. This is currently not respected in the TLB and the page
table walker. Fix that.
Change-Id: Icd59657a1ecfd8bd75a001bb1a4e41a6f4808a36
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10506
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/arch/arm/tlb.hh')
-rw-r--r-- | src/arch/arm/tlb.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh index b0e0d0d7f..b8ea99054 100644 --- a/src/arch/arm/tlb.hh +++ b/src/arch/arm/tlb.hh @@ -139,6 +139,14 @@ class TLB : public BaseTLB S12E0Tran = 0x80, S12E1Tran = 0x100 }; + + /** + * Determine the EL to use for the purpose of a translation given + * a specific translation type. If the translation type doesn't + * specify an EL, we use the current EL. + */ + static ExceptionLevel tranTypeEL(CPSR cpsr, ArmTranslationType type); + protected: TlbEntry* table; // the Page Table int size; // TLB Size |