From 65cf6b0a1c28644513f7bbb4192f732d84a0757c Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Tue, 30 Jan 2024 10:33:39 +0000 Subject: [PATCH] arch-arm: Cache the highestEL in the ISA object This is for fast retrieval of the highest implemented exception level Change-Id: Id631c2b999d46a8b79570e4043ae04bc2b2e7531 Signed-off-by: Giacomo Travaglini Reviewed-by: Richard Cooper --- src/arch/arm/isa.cc | 4 +++- src/arch/arm/isa.hh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc index f76f14997f..bf7d1b0a9c 100644 --- a/src/arch/arm/isa.cc +++ b/src/arch/arm/isa.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2023 Arm Limited + * Copyright (c) 2010-2024 Arm Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -106,6 +106,7 @@ ISA::ISA(const Params &p) : BaseISA(p, "arm"), system(NULL), // Cache system-level properties if (FullSystem && system) { highestELIs64 = system->highestELIs64(); + highestEL = system->highestEL(); haveLargeAsid64 = system->haveLargeAsid64(); physAddrRange = system->physAddrRange(); sveVL = system->sveVL(); @@ -114,6 +115,7 @@ ISA::ISA(const Params &p) : BaseISA(p, "arm"), system(NULL), release = system->releaseFS(); } else { highestELIs64 = true; // ArmSystem::highestELIs64 does the same + highestEL = EL1; // ArmSystem::highestEL does the same haveLargeAsid64 = false; physAddrRange = 32; // dummy value sveVL = p.sve_vl_se; diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh index 8ed37ba861..7b041f61b2 100644 --- a/src/arch/arm/isa.hh +++ b/src/arch/arm/isa.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012-2023 Arm Limited + * Copyright (c) 2010, 2012-2024 Arm Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -90,6 +90,7 @@ namespace ArmISA // Cached copies of system-level properties bool highestELIs64; + ExceptionLevel highestEL; bool haveLargeAsid64; uint8_t physAddrRange;