diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-10-24 10:32:20 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-10-26 09:45:47 +0000 |
commit | 16860301e804af0051a83f84c084b9e4c11eacb4 (patch) | |
tree | c366db8706c4500515a7dcb29d67e100358be2a8 /src/arch/arm/isa | |
parent | 438ecf9cb08f8e5681ef39df7f6709b8fdec2d50 (diff) | |
download | gem5-16860301e804af0051a83f84c084b9e4c11eacb4.tar.xz |
arch-arm: Trap to EL2 only if not in Secure State
MRS/MSR Instructions should trap to EL2 only if we are in non-Secure
state since at the current implementation (Armv8.0) there is no Secure
EL2.
Change-Id: I93af415fbcbd19a470752adf6afc92e520e9645d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/13777
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r-- | src/arch/arm/isa/insts/data64.isa | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/arm/isa/insts/data64.isa b/src/arch/arm/isa/insts/data64.isa index 25bcf782f..5f2a44c13 100644 --- a/src/arch/arm/isa/insts/data64.isa +++ b/src/arch/arm/isa/insts/data64.isa @@ -335,7 +335,9 @@ let {{ // Check for traps to hypervisor if ((ArmSystem::haveVirtualization(xc->tcBase()) && el <= EL2) && - msrMrs64TrapToHyp(flat_idx, el, %s, CptrEl264, Hcr64, &is_vfp_neon)) { + msrMrs64TrapToHyp(flat_idx, el, %s, CptrEl264, Hcr64, + Scr64, cpsr, &is_vfp_neon)) { + return std::make_shared<HypervisorTrap>( machInst, is_vfp_neon ? 0x1E00000 : imm, is_vfp_neon ? EC_TRAPPED_SIMD_FP : EC_TRAPPED_MSR_MRS_64); |