This patch implements a helper function to filter a register access
permissions by the highest EL implemented by the system.
This filtering is convenient to follow the architecture pseudocode.
Change-Id: Iedfb2d8624c926f2f0a9326f8b1b073ea9424ab9
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24663
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
/*
- * Copyright (c) 2010-2019 ARM Limited
+ * Copyright (c) 2010-2020 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
}
}
+ISA::MiscRegLUTEntryInitializer::chain
+ISA::MiscRegLUTEntryInitializer::highest(ArmSystem *const sys) const
+{
+ switch (FullSystem ? sys->highestEL() : EL1) {
+ case EL0:
+ case EL1: priv(); break;
+ case EL2: hyp(); break;
+ case EL3: mon(); break;
+ }
+ return *this;
+}
+
} // namespace ArmISA
ArmISA::ISA *
/*
- * Copyright (c) 2010, 2012-2019 ARM Limited
+ * Copyright (c) 2010, 2012-2020 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
user(0);
return *this;
}
+ chain highest(ArmSystem *const sys) const;
MiscRegLUTEntryInitializer(struct MiscRegLUTEntry &e,
std::bitset<NUM_MISCREG_INFOS> &i)
: entry(e),