From e360f4db072593893dcbbbdaa5d322f7d5061b34 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 26 May 2016 17:33:38 +0100 Subject: [PATCH] arm: Make EL checks available in SE mode A lot of code assumes that it is possible to test what the highest EL is and if it is 64 bit. These calls currently don't work in SE mode since they rely on an instance of an ArmSystem. Change-Id: I0d1f261926a66ce3dc4fa116845ffb2a081446f2 Signed-off-by: Andreas Sandberg Reviewed-by: Nikos Nikoleris Reviewed-by: Nathanael Premillieu --- src/arch/arm/system.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc index f4241aa3c..b61666339 100644 --- a/src/arch/arm/system.cc +++ b/src/arch/arm/system.cc @@ -219,13 +219,17 @@ ArmSystem::haveVirtualization(ThreadContext *tc) bool ArmSystem::highestELIs64(ThreadContext *tc) { - return dynamic_cast(tc->getSystemPtr())->highestELIs64(); + return FullSystem ? + dynamic_cast(tc->getSystemPtr())->highestELIs64() : + true; } ExceptionLevel ArmSystem::highestEL(ThreadContext *tc) { - return dynamic_cast(tc->getSystemPtr())->highestEL(); + return FullSystem ? + dynamic_cast(tc->getSystemPtr())->highestEL() : + EL1; } Addr